XML RPC Problem....

Usman Ajmal uzmanajmal at gmail.com
Sat Sep 13 06:06:11 EDT 2008


Where exactly should i call ServerProxy? Following is the code from my
client.py

t = SecureTransport()

       t.set_authorization(ustring, text_ucert)
    server = xmlrpclib.Server('http://localhost:8000/',transport=t)
    print server.s()

Note: Full code for client is here at http://privatepaste.com/b56oS1Xa7P

and following is my server code

import SimpleXMLRPCServer
#server = ServerProxy("http://betty.userland.com")
class AuthenticationFunctions:

    def s(self):
        print "something..."

server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost", 8000))
server.register_instance(AuthenticationFunctions())

server.serve_forever()


On Sat, Sep 13, 2008 at 8:44 AM, Fredrik Lundh <fredrik at pythonware.com>wrote:

> Usman Ajmal wrote:
>
>  Please explain the arguments of send_request. What exactly are the
>> connection, handler and request_body? It will be really helpful if you give
>> an example of how do i call send_request
>>
>
> you don't call send_request.  you should pass the SecureTransport instance
> as an argument to the ServerProxy, which will then use it to talk to the
> server.  see the "custom transport" example in the library reference that I
> pointed you to.
>
>  http://www.python.org/doc/lib/xmlrpc-client-example.html
>
> </F>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080913/0c684ae2/attachment.html>


More information about the Python-list mailing list