xml-rpc.binary and 'seek' (was Re: [Zope] xml-rpc authentication)
Tim Hicks
tim@sitefusion.co.uk
Fri, 29 Jun 2001 02:41:17 +0100
----- Original Message -----
From: "Andy McKay" <andym@ActiveState.com>
To: "Tim Hicks" <tim@sitefusion.co.uk>; <zope@zope.org>
Sent: Thursday, June 28, 2001 5:48 PM
Subject: Re: [Zope] xml-rpc authentication
> > Where should I put this code? Do I need to make any more alterations
> (other
> > than subclassing 'transport' as opposed to 'xmlrpclib.transport')?
>
> Nope. ZSyncer, uses a script based on Amos's original code very
successfully
> btw. I use it a great deal. If you look at that python it might help
> basically just put xmlrpclibBasicAuth.py (from ZSyncer) in Zope/bin/lib.
>
> And instead of calling xmlrpclib, call xmlrpclibBasicAuth:
>
> from xmlrpclibBasicAuth import Server
> s = Server('http://foo.bar.com', 'user', pwd')
> s.hello()
Andy,
thats great. It works a treat :-))). I've now found another little
problem. I can call any method on the remote Zope server that simply
requires plain text arguments, but when I try to send binary over, I get,
Error Type: AttributeError
Error Value: seek
This is whether I use xmlrpclib.binary(mybinarydata) or simply pass
mybinarydata. I searched the zope list, and found that 'Kyler B. Laird'
posted a message with this very problem (hence Kyler being cc'd - hope you
don't mind Kyler), but there was no reply to it, so I couldn't find out
how/if there was a resolution. Do you have any idea what I'm doing wrong?
thanks
tim
ps Just like to say thanks David for your suggested solution. I went with
Andy's simply because his mail arrived first. I appreciate your time. Your
'method' was actually very instructive for me in the ways of python :-).