Python 3 xmlrpc for remote objects

1.7k Views Asked by At

I am trying to implement a remote object implementation using xmlrpc, and python 3. I have tried the example at http://docs.python.org/3.1/library/xmlrpc.server.html?highlight=xmlrpc#simplexmlrpcserver-example, but it only works to and from localhost, how can I get it to work to and from internal IPs?

2

There are 2 best solutions below

2
On BEST ANSWER

Perhaps I'm misunderstanding your question, but... Have you tried running the server code on another machine, and the client code (changing the 'localhost' value in the first line of the client code s = xmlrpc.client.ServerProxy('http://localhost:8000') to the IP address of the remote server?

0
On

Update the localhost value to the following:

For the server : s = SimpleXMLRPCServer(("ServerIp", 8000))

For the client : s = xmlrpc.client.ServerProxy("http://ServerIp:8000/")