[Zope] [Fwd: Re: Zope Solution]

Philipp Auersperg phil@bluedynamics.com
07 Dec 2001 01:07:48 +0100


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


Am Don, 2001-12-06 um 23.20 schrieb Jason Earl:
> 
> I had wondered if such a thing would work.  I have some logic that I
> would like to reuse from my Zope application, and I have been playing
> with accessing this logic via XML-RPC.  So far it has worked fairly
> well, but I am only in the early development stages.
> 
> Any useful tips to someone just starting out?
> 
> Jason
> 
> Philipp Auersperg <phil@bluedynamics.com> writes:
> 
> > Hi!
> > 
> > You're right, as Stephan answered to you we used in this project Zope as
> > a pure 'blind' appserver.
> > 
> > the protocol we used there is xmlrpc (www.xmlrpc.com) which has bindings
> > for nearly all languages, among these: python,c++,java  on client and
> > serverside. xmlrpclib marshalls function calls and basic types
> > (scalars,dicts,lists,datetimes) as xml statements and uses http as
> > transport.
> > 
> > Zope has a built-in xmlrpc server.
> > 
> > There are also projects for other protocols (SOAP and CORBA) but I think
> > the latter one is in an experimental state.
> > 
> > The point I liked so much about xmlrpc was that is very uncomplicated to
> > implement.
> > 
> > As I can read from your explanation it should be well possible to
> > implement that with Zope.
> > 
> > Please let me know when you need more information, perhaps you can then
> > provide me more details about your project .
> > 
> > 
> > regards
> > 
> > phil
> 
> _______________________________________________
> 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 )
>