00001
00002
00003 import sys
00004 from ZSI.ServiceContainer import AsServer
00005 from BasicServer_server import BasicServer
00006
00007 """
00008 BasicServer example service
00009
00010 WSDL: BasicComm.wsdl
00011
00012 """
00013
00014
00015 class Service(BasicServer):
00016 def soap_Basic(self, ps):
00017 request,response = BasicServer.soap_Basic(self, ps)
00018 response._BasicResult = request._BasicIn
00019 return request,response
00020
00021 def soap_BasicOneWay(self, ps):
00022 request,response = BasicServer.soap_BasicOneWay(self, ps)
00023 if request._BasicIn == 'fault':
00024
00025 raise RuntimeError, 'you wanted a fault?'
00026
00027 return request,response
00028
00029
00030 if __name__ == "__main__" :
00031 port = int(sys.argv[1])
00032 AsServer(port, (Service('test'),))