readme_zope
release 1.0
written by Gijs Reulen, Netherlands
Executable(s) and source are provided without warranty or support. However, if you find any bugs, have ideas or can supply code for improvement then I would be delighted to hear from you.
See the file readme.txt for a description of the supplied files.
Zope ====
The utility was written so I could better understand the possibilities of xml-rpc with Zope. I am looking for an easy way of using my favorite editor (or at least something else then a browser) transparantly with Zope. I am now very close to an implemention of that :-) Once it is finished I will probably also make it available with source if it turns out people are interested in developing Zope from a Windows platform. Also any help would be very much appriciated; see bottom.
The executable will only run on Windows (any 32 bits version will do I guess) as that is the platform I normally work from and am very familiar with programming for. Mind you: the Zope server itself can run on any platform anywhere in the world ! Also: Borland will release a Linux version of Delphi within 6 months. It should not be to hard to convert some of the stuff to Linux with it (if ever a need for it, and also Zope Studio is on its way).
xml-rpc in Zope ===============
All valid xml-rpc (?) calls are documented inside Zope 2.2: click on the 'Help'-button, then Zope help and finally API Documentation.
With me, most Method Calls return an error :-( From the ones I tried the calls that work for me using Zope 2.1.6 are:
title_and_id title_or_id objectIds document_src enables me to retrieve the source of any Method or Document manage manage_workspace manage_edit enables me to save source that is modified, however both source and title must be supplied manage_addDTMLMethod manage_addDocument
Current status: Using the xmlrpc.exe utility, the xmlrpclib.pas, the methods listed above and some simple parsing, have an application that can visually browse the complete Object tree of Zope. It is also possible to edit and save the source of any Method or Document. However, currently the editing is done in a Windows Memo-field (same functionality as NotePad.exe). A webbrowser is integrated, defaults to managing non-source-editable objects.
help needed: I am unable to use most of the methods documented in the API. The list above is about it. This means for example that I am not able to tell what kind each object is, other then by testing it (does it return a list of contents ? does it return a source ?). There are methods that should return the type but these result in an XML or Zope error :-( Also, even some of the methods above return an error from Zope 2.2. I think it has to do with Ownership stuff but I had no need for looking into that. Both problems are maybe related: the app does not have the correct priviliges or role or parameters or I misspelled them (?!) or whatever. Or maybe it has to be something like 'self.manage_addProduct['OFSP'].manage_addFolder(id, title)', but I do not know how to do that in xmprpc-ish. I could really use some help here !
most urgent:
1)
I Need a method to retrieve the correct meta-type. Then the app does not need to make several different method calls, which can be very time-consuming with slow lines and remote servers (even noticable with local Zope on my 700Mhz Win2000 ;-)
Also, now my tree only displays the id (eventually I will add the title). This does not give any clues about the structure of the tree below, other then the user doing a trial and error. Being able to show the type would really help here.
The meta-type info is also stored as an attribute to the ObjectManagerItem, but how should one access these ?
Maybe another solution is to do multiple method calls with objectIds and a parameter specifying one metatype. However, the only metatype I currently know is Folder (from the given example). Things like Document or DTMLDocument do not work ?!
Another option: creating a Python ExternalMethod to act as an interface. The editor calls the interface with xmlrpc and the interface will interact with Zope. The editor could easily auto-install this module when a simple ftp client is implemented.
2)
Why do most methods not even work with Zope 2.2 (standard install) ?
less urgent: 1) Use of the Method get_size results in an error: Zope has encountered a problem publishing your object. Missing doc string at: http://127.0.0.1:8080/index_html/get_size It would be nice if I could display the size of each object. 2) Some way of replacing only the source of a document or method; now I also need to retrieve the title. And the other way around is even worse: to change the title, I also have to retrieve and save the source. 3) It would be nice to be able to cut and paste parts of the tree. 4) Maybe retrieving the the correct icons for non-standard Zope objects.
near future: Integrated web browser. User-selectable editor. Dragging and dropping of html-files and images.
future: Who knows ? Maybe also a small ftp client for editing ExternalMethods in Python.
links: http://www.borland.com http://www.xmlrpc.com http://www.zope.org/Members/Amos/XML-RPC http://www.zope.org/Members/teyc/howxmlrpc http://www.zope.org//Products/ZopeStudio
relevant Wikis: http://www.zope.org//Wikis/DevSite/Proposals/CleanUpTheCore http://www.zope.org//Wikis/DevSite/Proposals/ManagementInterfaceNG
Sorry for my Dutchie English !
Gijs Reulen