[Zope] using a ZCatalog via xmlrpc

Sylvain Thénault Sylvain Thénault
Tue, 13 Aug 2002 10:04:07 +0200


hello,

is there some way to use a ZCatalog via xmlrpc ?
The following example raises an exception :

import xmlrpclib
import xmlrpc
transport = xmlrpc.BasicAuthTransport(username='user',password='pass')
url = 'http://intranet.logilab.fr:9673/RevuePresse/'
server = xmlrpclib.Server(url, transport, encoding='iso-8859-1')
server.Catalog.searchResults()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/xmlrpclib.py", line 821, in __call__
       return self.__send(self.__name, args)
  File "/usr/lib/python2.2/xmlrpclib.py", line 975, in __request
       verbose=self.__verbose
  File "xmlrpc.py", line 51, in request
       return self.parse_response(result)
  File "/usr/lib/python2.2/xmlrpclib.py", line 896, in parse_response
       return u.close()
  File "/usr/lib/python2.2/xmlrpclib.py", line 571, in close
       raise apply(Fault, (), self._stack[0])
xmlrpclib.Fault: <Fault -1: "Unexpected	Zope exception: cannot marshal 
			    <type 'IOBTreeItems'> objects">

any ideas ? sample of working code ?
TIA

-- 
Sylvain Thénault

  LOGILAB           http://www.logilab.org