[Zope] xml-rpc authentication

Tim Hicks tim@sitefusion.co.uk
Thu, 28 Jun 2001 17:20:18 +0100


I am trying to use xml-rpc to get hold of some files uploaded to one Zope
server, send them to another for some processing, and then have them
returned to the first server.  My difficulty is in the authentication part.
I have read Amos' tutorial (http://www.zope.org/Members/Amos/XML-RPC), and
understand that xmlrpclib.py in its standard form does not handle http
authentication.  My problem is that I'm not really that hot on python, so I
don't totally understand how to implement Amos' BasicAuthTransport class.
Where should I put this code?  Do I need to make any more alterations (other
than subclassing 'transport' as opposed to 'xmlrpclib.transport')?

I had a go at getting things to work; here's what I did:

1)    Made a copy of xmlrpclib.py named xmlrpclibx.py to play with
2)    Pasted in Amos' BasicAuthTransport class code.
3)    Changed the line in the 'Server' class so that it set 'transport' to
'BasicAuthTransport()'

... but I simply got a syntax error when I tried to 'import xmlrpclibx' in
my external method.

Can anyone help me out?

thanks

tim