[Zope-dev] access to ZCatalog-data via xmlrpc

Toby Dickenson tdickenson@geminidataloggers.com
Wed, 29 May 2002 16:15:44 +0100


On Wednesday 29 May 2002 3:24 pm, Joachim Schmitz wrote:
> Hi,
>
> I want to acces a ZCatalog via xmlrpc, but
>
> server=3Dxmlrpclib.Server("http://myserver.aixtraware.de"
>                         ,BasicAuthTransport(username=3D"user",password=3D=
"pw"))
> r =3D server.Catalog()
>
> results in
>
> <Fault -1: "Unexpected Zope exception: cannot marshal <type 'IOBTreeIte=
ms'>
> objects">
>
> What is to do, to enable marshalling of those types ?

You could hack xmlrpclib to marshall those object, but I dont recommend i=
t.=20
Those objects can be big (but lazily evaluated), and you would be opening=
 a=20
significant denial of service vulnerability in your server.

I suggest you create a method (Python Script?) that makes the catalog que=
ry,=20
sanitizes the response by making sure it is not too big, and returns a=20
vanilla list or dictionary