[Zope] [Fwd: Re: Zope Solution]

Jason Earl jason.earl@simplot.com
07 Dec 2001 11:33:08 -0700


Hmm... I actually know *how* to use XML-RPC, in fact I think that it
is incredibly slick.  Currently I am using it to enter email messages
into a PostgreSQL database.  I already had the logic to do this in
Zope, and so it seemed a shame to not reuse it.

So far this has worked really well, but I was concerned about how well
tested this sort of thing is, and how well it scales.

Jason

Philipp Auersperg <phil@bluedynamics.com> writes:

> As a minimal example for xmlrpc you can use that:
> 
> - in your zope create in the root folder a PythonScript let's call it
> 'xmltest'
> 
> - give it one parameter called 'par'
> 
> - into the body write:
> 
> return ['your parameter was:',par]
> 
> 
> --
> start python at the commandline:
> 
> >>> import xmlrpclib
> >>> s=xmlrpclib.Server('http://zwork.bluedynamics.com:50280')  # or
>                                                #whatever your zope is
> >>> s.xmltest('2') 
> 
> --
> 
> it returns an array containing a string and the parameter that you
> passed. you can try it out with other parameters (dicts,lists....)
> 
> I can help you if you need more info, but you have to specify your
> question more precisely.
> 
> you can check out the xmlrpc howto on zope.org by Amos Latteier with
> many useful hints (just search for 'xmlrpc' there).
> 
> also check out www.xmlrpc.com for detailled zope-independent infos
> 
> good luck
> phil