Setting up test for XML-RPC

Moosebumps crap at crud.com
Sat Jan 10 04:30:48 EST 2004


I'm trying to test out Python XML-RPC for the first time, and can't find
anything that executes a call end to end.

I thought that I would use SimpleXMLRPCServer to run a simple server on
localhost, and xmlrpclib to run a client that connects to it, but they don't
seem to register the same functions.  The server test code registers 'pow'
and 'add' (in the Python 2.3 distribution) but the client seems to call
"print server.examples.getStateName(41)".  It doesn't seem like they were
meant to work together as a unit test, although that would seem logical.

Can anyone help me just get a single XML-RPC call to execute (and I want to
see both the client and server code)?  I have googled extensively and
haven't come up with anything.

Also -- I'm investigating this for a nightly build process involving many
machines.  There is going to be a master machine that sends requests to 20
other machines to build things.  They're just a bunch of Windows XP
machines, with almost no software on them.  What software would I need to
install to run XML-RPC servers on them to receive requests?  Just Python and
a web server like Apache?

If there are any other _very_ lightweight RPC mechanisms, I would appreciate
hearing about them.  I am writing some build scripts in Python, and while I
could for example schedule a task on 20 machines separately, it would be
nicer to have a master machine control when the build happened, etc. and be
able to manage dependencies by waiting for a return result, etc.  All I want
to do is execute a python function on a remote machine and get a result
back.  It is all done in a local, secure environment.

Thanks for all the previous responses to my questions -- this newsgroup has
been very helpful.

MB





More information about the Python-list mailing list