access to xml_rpc server problem

Ted Zeng zeng at adobe.com
Wed Sep 20 20:30:45 EDT 2006


HI,

I run a xml_rpc server like the following:(sample code from internet)

server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost", 8000))
server.serve_forever()

If my client is on the same machine, I use :(also from internet sample
code)

server = xmlrpclib.Server('http://localhost:8000')
print server.chop_in_half('I am a confidant guy')

This works fine.

But if I use server's ip address instead of localhost in the client,
then it could not access the server.

server = xmlrpclib.Server('http://machine_ip_address:8000')
print server.chop_in_half('I am a confidant guy')


How can my client (runs on other machine) access the server? The server
runs on a machine with dynamic IP. But my client knows the IP address.


Ted Zeng




More information about the Python-list mailing list