XL-RPC Recipe

Thomas thomas.bugzilla at gmx.net
Wed Jul 18 12:16:39 CEST 2007


Hi list!

I'm struggling with a recipe from the Python Cookbook (2nd ed.)
concerning XML-RPC. It's recipe 15.2 "Serving XML-RPC Requests", and
since I thought it's a popular book some other folks might have
discovered (and probably solved) the same issue.

The recipe provides server and client code, and I get an
error when trying the following client request:

print server.python_string.join(['I', 'like it!'], " don't ")

(In the server code the string name space is mapped into the
'python_string' member with "import string; self.python_string = string").

The error report says:

xmlrpclib.Fault: <Fault 1: '<type \'exceptions.Exception\'>:method
"python_string.join" is not supported'>

This happens with all the string methods in
StringFunctions.python_string. Is there a general issue with mapping
name spaces into an RPC object? Or am I missing a major point here?

I tried all of this on a fairly up-to-date Linux with a stock
Python 2.5 (also tried with WinXP/cygwin/Python2.5.1 and with a
Stackless 2.5.1, always with same outcome, so I don't believe it's an
issue of a local installation).

Any hints?

=Thomas



More information about the Python-list mailing list