Service classes checked in

Robert Olson olson at mcs.anl.gov
Mon Dec 16 17:51:37 CST 2002


I have updated the AccessGrid/hosting/pyGlobus directory with the fixed 
SOAP-based service API classes. Included in there are example clinet/server 
in tclient.py / tserver.py. Note the use of method attributes 
pass_connection_info and soap_export_as instead of the docstring annotation.

--bob

A Service:

import Server
import ServiceBase

class C(ServiceBase.ServiceBase):
     def meth(self, cinfo, x, **kargs):
         print "Got meth ", cinfo, x, kargs
         return ('you sent', cinfo, x)

     meth.pass_connection_info = 1
     meth.soap_export_as = "method"

if __name__ == "__main__":

     server = Server.Server(8000)

     s = server.create_service(C)

     print "Have %s %s" % (s, s.get_handle())

     server.run()

and a client to that service:


import Client

h = Client.Handle('https://localhost:8000/100')

ret = h.get_proxy().method(3)
print "Got '%s' from method"  % (map(lambda x: str(x), ret))




More information about the ag-dev mailing list