server.py
--------------
from ZSI import dispatch
def test_method(name):
return "Hello " + name
print "Starting server..."
dispatch.AsServer(port=9300, rpc=True)
client.py
-------------
from ZSI.client import Binding
b = Binding(url='http://localhost:9300')
name = "saju"
print "Output : ", b.test_method(name)
Open two terminals
In terminal one run
#python server.py
Starting server...
In terminal two run
#python client.py
Output : Hello saju
No comments:
Post a Comment