/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
@service.xmlrpc def add(a1,a2): ''' # Sample Python Client Call from xmlrpclib import ServerProxy, Error #server = ServerProxy('http://localhost:8000/Test1/default/call/xmlrpc') # local server def GetProxy(): return ServerProxy('http://localhost:8000/Test1/default/call/xmlrpc') s = GetProxy() print s.add(3,4) ''' return a1 + a2