xml-rpc and zope help

Gilles Lenfant glenfant at NOSPAM.bigfoot.com
Thu Feb 6 10:27:30 EST 2003


"sanjay" <sanjay2kind at yahoo.com> a écrit dans le message de news:
63170f57.0302060705.34a3167c at posting.google.com...
> Hi All,
>
>   Working on zope 2.5, xml-rpc. How to get all folder object from
> another zope server. I tried like following using external method,
> shows error.
> Example has been published in
> http://www.xml.com/pub/a/2000/01/xmlrpc/index2.html
>
>
f=xmlrpclib.Server('http://localhost:8080',xmlrpclib.BasicAuthTransport('myu
sername','mypassword'))

Correction :

f=xmlrpclib.Server('http://localhost:8080/',xmlrpclib.BasicAuthTransport('my
username','mypassword'))

(don't forget the "/" after "8080" when playing with xmlrpc)

objectIds() is protected for calls through xmlrpc for security issues.

Workaround :
Create a script called "xObjectIds" at the Zope root. Protect this script
(view for managers only).
This sript will have the single line :

return contects.objectIds()

This works cause it returns a list of strings.

You can't return objects through xmlrpc. There are type limitations and you
must marshall your objects to tuples, dictionnaries, strings, int, floats or
timesamps to transmit data through xmlrpc. That's why you can't get
objectValues through xmlrpc.

HTH

--Gilles







More information about the Python-list mailing list