[Zope] XML-RPC over SSL
Michel Pelletier
michel@digicool.com
Tue, 1 May 2001 11:19:37 -0700 (PDT)
On 27 Apr 2001, Petr Knapek wrote:
> Hi Zopists,
> does anybody of you know how to do "subject" in Zope 2.3.0 (2.3.1) on
> Linux Debian.
>
> I have already installed M2Crypto but do not know how to use it. When I
> tried this in python:
>
> from M2Crypto import xmlrpclib2
> s = xmlrpclib2.Server("https://uid:password@host/")
> print s.index_html()
>
> this error is returned:
>
> >>> print s.index_html()
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> File "/usr/lib/zope/lib/python/xmlrpclib.py", line 547, in __call__
> return self.__send(self.__name, args)
> File "/usr/lib/zope/lib/python/xmlrpclib.py", line 630, in __request
> request
> File "/usr/lib/zope/lib/python/xmlrpclib.py", line 560, in request
> h = httplib.HTTP(host)
> File "/usr/lib/python1.5/httplib.py", line 51, in __init__
> if host: self.connect(host, port)
> File "/usr/lib/python1.5/httplib.py", line 75, in connect
> raise socket.error, "nonnumeric port"
> socket.error: nonnumeric port
>
>
> Can anybody help me?
xmlrpclib does not understand the uid:password@url syntax. This is not
how you do authentication with xmlrpclib, you need to subclass and create
your own transport. The new xmlrpclib should come with a transport that
supports Basic authentication. See the xmlrpclib sources or the xmlrpclib
mailing list for more info.
-Michel