[Zope] xmlrpc calls require string results?

Phil Harris phil.harris@zope.co.uk
Fri, 5 Nov 1999 23:22:46 -0000


objectIds() works but what happens when you try objectValues()?



> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Toby
> Dickenson
> Sent: 05 November 1999 16:36
> To: 'Dan Pierson'; 'zope@zope.org'
> Subject: RE: [Zope] xmlrpc calls require string results?
> 
> 
> 
> 
> > -----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' ......
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
>           No cross posts or HTML encoding!
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>