[Twisted-Python] xmlrpc

Andrew Bennetts andrew-twisted at puzzling.org
Wed Nov 13 05:08:31 EST 2002

On Wed, Nov 13, 2002 at 05:12:12PM +0800, lals;dfjsd wrote:
> I am trying the examples in www.xmlrpc.com with twisted matrix but I have
> hit a wall I hope that somebody can give me a hand.
> My xmlrpc server code :
> #!c:\python22\python.exe
> from twisted.web import xmlrpc
> from twisted.internet import defer
> import xmlrpclib
> class Echoer(xmlrpc.XMLRPC):
>     def echo_something(self,name):
          Shouldn't this be "xmlrpc_something"?

> The error I get :
> web.Server Traceback xml.parsers.expat.ExpatError: no element found: line 1, column 0 

Hmm.  That looks like the xmlrpc call you are sending is somehow broken, but
I don't know enough about xmlrpc to say if that's the case.

> I a newbie at this so please forgive me if what i am doing is like really
> stupid or i am asking a dumb question. Thanks

Have you looked at doc/examples/xmlrpc.py in the Twisted distribution?  It
includes a simple server example, and in the comments describes how to
connect to it using python2.2's xmlrpclib client.


More information about the Twisted-Python mailing list