Your Ad Here

Posted By

laurenceosx on 07/30/09


Tagged

python XMLRPC web2py


Versions (?)

web2py xmlrpc service


 / Published in: Python
 

  1. @service.xmlrpc
  2. def add(a1,a2):
  3. '''
  4. # Sample Python Client Call
  5. from xmlrpclib import ServerProxy, Error
  6.  
  7. #server = ServerProxy('http://localhost:8000/Test1/default/call/xmlrpc') # local server
  8.  
  9. def GetProxy():
  10. return ServerProxy('http://localhost:8000/Test1/default/call/xmlrpc')
  11.  
  12. s = GetProxy()
  13. print s.add(3,4)
  14. '''
  15. return a1 + a2

Report this snippet  

You need to login to post a comment.