[BangPypers] XML RPC Problem....

Usman Ajmal uzmanajmal at gmail.com
Thu Sep 11 09:08:37 CEST 2008


Hi everyone,

I am trying to call a function named system.auth at the server side running
at localhost:8080 but at the same time i want to set  the http header.  I
found that header can be set by

h.putheader("AUTHORIZATION",
            "Basic %s"%encodestring("%s:%s" % (ustring,text_ucert)))

#ustring: just a random string
#text_ucert: a file containing the X509 certificate of client

And i also fount that a typical system.auth call will look like:

POST /xmlrpc/clarens_server.py HTTP/1.0
Host: localhost
User-Agent: xmlrpclib.py/0.9.9 (by www.pythonware.com)
Content-Type: text/xml
Content-Length: 105
AUTHORIZATION: Basic MkhVTm9VazYxbXArVEZLS0dCY2tIRlA3bjVzPQo6RnJvbSBi
<?xml version='1.0'?>
<methodCall>
  <methodName>system.auth</methodName>
  <params>
  </params>
</methodCall>


Problem is that i don't know how do i generate above xml system.auth call.
Can anyone please tell me how do call a function, setting the header of the
call too?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20080911/26a628ba/attachment.htm>


More information about the BangPypers mailing list