• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

contrib/opal/ZSI/test/wsdl2py/servers/EchoWSAddr200403Server.py

00001 #!/usr/bin/env python
00002 ############################################################################
00003 # Joshua R. Boverhof, LBNL
00004 # See LBNLCopyright for copyright notice!
00005 ###########################################################################
00006 import sys
00007 from ZSI.ServiceContainer import AsServer
00008 from EchoWSAddr200403Server_server import EchoWSAddr200403Server as EchoServer
00009 from ZSI.schema import GTD
00010 
00011 """
00012 EchoServer example service
00013 
00014 WSDL:  ../../samples/Echo/Echo.wsdl
00015 
00016 """
00017 
00018 EndpointReferenceType = GTD('http://schemas.xmlsoap.org/ws/2004/03/addressing','EndpointReferenceType')
00019 
00020 
00021 class WSAService(EchoServer):
00022     def wsa_Echo(self, ps, address):
00023         request,response = EchoServer.wsa_Echo(self, ps, address)
00024         response.EchoResult = request.EchoIn
00025 
00026         if isinstance(response.EchoResult, EndpointReferenceType):
00027             addr1 = response.EchoResult
00028             for a in address.Any:
00029                 if a not in addr1.ReferenceProperties.Any:
00030                     raise RuntimeError, 'EPRs dont match'
00031 
00032         return request,response
00033 
00034 
00035 if __name__ == "__main__" :
00036     port = int(sys.argv[1])
00037     AsServer(port, (WSAService('test'),))

Generated on Wed Oct 20 2010 11:12:16 for APBS by  doxygen 1.7.2