xml-rpc.binary and 'seek' (was Re: [Zope] xml-rpc authentication)

Andy McKay andym@ActiveState.com
Fri, 29 Jun 2001 13:00:24 -0700


You might try using base64 encoding and decoding.

Cheers.
--
  Andy McKay.


----- Original Message -----
From: "Tim Hicks" <tim@sitefusion.co.uk>
To: "Andy McKay" <andym@activestate.com>; <zope@zope.org>; "David Burton"
<eloquence@eloquent-designs.f2s.com>
Cc: <laird@ecn.purdue.edu>
Sent: Thursday, June 28, 2001 6:41 PM
Subject: xml-rpc.binary and 'seek' (was Re: [Zope] xml-rpc authentication)


> ----- 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 :-).
>