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

Toby Dickenson tdickenson@geminidataloggers.com
Thu, 30 May 2002 11:29:26 +0100


On Thursday 30 May 2002 11:11 am, M.-A. Lemburg wrote:

> XML-RPC only has a limited set of types it can marshal and that
> can't be changed without breaking the standard.

Yes, that means you unmarshall some xml-rpc data into a python None.

xmlrpc doesnt have support for marshalling class instances, but xmlrpclib=
=2Epy=20
will marshall python class instances to xmlrpc dictionaries *because* *it=
*=20
*is* *useful* to do so.

If you were designing an interface specifically for xml-rpc you would des=
ign=20
it to avoid Nones. However most Zope interfaces are designed for other=20
purposes, then xml-rpc usage comes later. Its difficult to take the None'=
s=20
out of your data structures once they are in.

When the xml-rpc marshaller sees a None going *out* of Zope, I think it m=
akes=20
sense to marshall this is an integer zero (or Joachim suggested the strin=
g=20
"None"). That makes more sense than raising an exception. (In Zope, anywa=
y.=20
Im not making any comments about other xmlrpclib.py uses)