[Zope] xmlrpc calls require string results?
Toby Dickenson
tdickenson@geminidataloggers.com
Fri, 5 Nov 1999 16:36:14 -0000
> -----Original Message-----
> From: Dan Pierson [mailto:dan@remote.control.com]
>
> > From: Toby Dickenson
> >
> > > # if a method called by it doesn't return a string.
> > > # This is bogus, but:
> > > return 'Done'
> > >
> > > BTW: all of this appears to me to be true whether or not
> > Squishdot is
> > > involved -- I have tested with target methods that are not
> > part of it.
> > >
> > > What am I doing wrong here?
> >
> > Obviously xmlrpclib needs to be able to marshal the return
> > value back to the
> > caller. The xmlrpc spec has no equivalent of the 'None' that
> > results from a
> > returnless function in python, hence the error.
> >
> > The return values does not have to be a string; just
> > something that xmlrpc
> > understands.
>
> I can understand this in principal, but methods that return
> simple integers
> fail. I'd expect xmlrpc to be able to handle them.
>
> Also some of the articles in the Byte series talk about
> passing structures
> back and forth so I assumed that the xmlrpc support was smart
> enought to do
> things like pack a list of ids (i.e. list of strings) as an
> XML structure on
> its own.
Well, it works ok for me.
>>> xmlrpclib.Server('http://server/').objectIds()
['Control_Panel', 'standard_html_header', 'standard_html_footer',
'standard_erro
r_message', 'acl_users' ......