source: TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/server/EchoService_services.py @ 3123

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/server/EchoService_services.py@3123
Revision 3123, 1.3 KB checked in by pjkersha, 12 years ago (diff)

security/python/ndg.security.test/ndg/security/test/wsSecurity/client: use ndg urn for WSDL and rename 'EchoService?'

Line 
1##################################################
2# Echo_services.py
3# generated by ZSI.generate.wsdl2python
4##################################################
5
6
7from Echo_services_types import *
8import urlparse, types
9from ZSI.TCcompound import ComplexType, Struct
10from ZSI import client
11import ZSI
12from ZSI.generate.pyclass import pyclass_type
13
14# Locator
15class EchoLocator:
16    Echo_address = "http://localhost:7100"
17    def getEchoAddress(self):
18        return EchoLocator.Echo_address
19    def getEcho(self, url=None, **kw):
20        return EchoSOAP(url or EchoLocator.Echo_address, **kw)
21
22# Methods
23class EchoSOAP:
24    def __init__(self, url, **kw):
25        kw.setdefault("readerclass", None)
26        kw.setdefault("writerclass", None)
27        # no resource properties
28        self.binding = client.Binding(url=url, **kw)
29        # no ws-addressing
30
31    # op: <ZSI.wstools.WSDLTools.Message instance at 0x406f9bec>
32    def Echo(self, EchoIn):
33
34        request = EchoInputMsg()
35        request._EchoIn = EchoIn
36
37        kw = {}
38        # no input wsaction
39        self.binding.Send(None, None, request, soapaction="Echo", **kw)
40        # no output wsaction
41        response = self.binding.Receive(EchoOutputMsg.typecode)
42        EchoResult = response._EchoResult
43        return EchoResult
44
45EchoInputMsg = ns0.Echo_Dec().pyclass
46
47EchoOutputMsg = ns0.EchoResponse_Dec().pyclass
Note: See TracBrowser for help on using the repository browser.