Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > xmlrpc with Basic Auth

Reply
Thread Tools

xmlrpc with Basic Auth

 
 
Milos Prudek
Guest
Posts: n/a
 
      09-15-2006
I need to use XML-RPC call with Basic Authorization in HTTP headers. I found
xmlrpclibBasicAuth.py, and it can be used as follows:

from xmlrpclibBasicAuth import Server
s=Server("http://www.example.com/rpc.php","user","pwd")
print s.system.listMethods()

Is this possible in plain xmlrpclib, without xmlrpclibBasicAuth.py?

I found the Transport class in xmlrpclib, and it has a method "get_host_info",
which parses "userwd" out of "userwd@host". But when I tried to
instantiate Server, it threw error "unsupported XML-RPC protocol". Here is a
snippet:

from xmlrpclib import Server
s=Server("userwd@http://www.example.com/rpc.php")
....
File "/usr/local/lib/python2.3/xmlrpclib.py", line 1293, in __init__
raise IOError, "unsupported XML-RPC protocol"
IOError: unsupported XML-RPC protocol

I know that I am using it incorrectly. Does the basic authentication support
in xmlrpclib mean something else than I take it for?

--
Milos Prudek
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xmlrpc and auth-digest Thomas Liesner Python 1 01-08-2007 06:20 PM
xmlrpc an auth-diget Thomas Liesner Python 0 01-08-2007 04:59 PM
Re: xmlrpc with Basic Auth Milos Prudek Python 0 09-16-2006 09:18 AM
Configuring Windows Auth & Forms Auth in Asp.Net =?Utf-8?B?Q2hyaXMgTW9oYW4=?= ASP .Net 0 04-28-2004 06:11 PM
Re: xmlrpc, httplib and SSL (HTTP 1.1 XMLRPC client) Etienne Posthumus Python 1 04-01-2004 05:13 PM



Advertisments