source: TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/EchoServer_services_types.py @ 1696

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.test/ndg/security/test/wsSecurity/EchoServer_services_types.py@3107
Revision 1696, 4.0 KB checked in by pjkersha, 13 years ago (diff)

Working test code for ZSI Web Service using Twisted:

  • for server, used wsdl2dispatch - but make sure to edit the return types

in AttAuthority_services_server server class stubs to return request, response
tuple as required by Twisted interface. Created .tac file which loads a
sub class of the wsdl2dispatch generated class.

  • tested with standard ZSI client using stubs generated from wsdl2py. Also

tested with Twisted client - stubs generated with wsdl2py including the -w
option.

Line 
1##################################################
2# EchoServer_services_types.py
3# generated by ZSI.generate.wsdl2python
4##################################################
5
6
7import ZSI
8import ZSI.TCcompound
9from ZSI.schema import LocalElementDeclaration, ElementDeclaration, TypeDefinition, GTD, GED
10
11##############################
12# targetNamespace
13# urn:ZSI:examples
14##############################
15
16class urn_ZSI_examples:
17    targetNamespace = "urn:ZSI:examples"
18
19    class Echo(ZSI.TCcompound.ComplexType, ElementDeclaration):
20        literal = "Echo"
21        schema = "urn:ZSI:examples"
22        def __init__(self, **kw):
23            ns = urn_ZSI_examples.Echo.schema
24            TClist = [ZSI.TC.String(pname=(ns,"EchoIn"), aname="EchoIn", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
25            kw["pname"] = ("urn:ZSI:examples","Echo")
26            kw["aname"] = "Echo"
27            self.attribute_typecode_dict = {}
28            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
29            class Holder:
30                typecode = self
31                def __init__(self):
32                    # pyclass
33                    self.EchoIn = None
34                    return
35            Holder.__name__ = "Echo_Holder"
36            self.pyclass = Holder
37
38    class EchoResponse(ZSI.TCcompound.ComplexType, ElementDeclaration):
39        literal = "EchoResponse"
40        schema = "urn:ZSI:examples"
41        def __init__(self, **kw):
42            ns = urn_ZSI_examples.EchoResponse.schema
43            TClist = [ZSI.TC.String(pname=(ns,"EchoResult"), aname="EchoResult", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
44            kw["pname"] = ("urn:ZSI:examples","EchoResponse")
45            kw["aname"] = "EchoResponse"
46            self.attribute_typecode_dict = {}
47            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
48            class Holder:
49                typecode = self
50                def __init__(self):
51                    # pyclass
52                    self.EchoResult = None
53                    return
54            Holder.__name__ = "EchoResponse_Holder"
55            self.pyclass = Holder
56
57    class EchoEncr(ZSI.TCcompound.ComplexType, ElementDeclaration):
58        literal = "EchoEncr"
59        schema = "urn:ZSI:examples"
60        def __init__(self, **kw):
61            ns = urn_ZSI_examples.EchoEncr.schema
62            TClist = [ZSI.TC.String(pname=(ns,"EchoIn"), aname="EchoIn", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
63            kw["pname"] = ("urn:ZSI:examples","EchoEncr")
64            kw["aname"] = "EchoEncr"
65            self.attribute_typecode_dict = {}
66            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
67            class Holder:
68                typecode = self
69                def __init__(self):
70                    # pyclass
71                    self.EchoIn = None
72                    return
73            Holder.__name__ = "EchoEncr_Holder"
74            self.pyclass = Holder
75
76    class EchoEncrResponse(ZSI.TCcompound.ComplexType, ElementDeclaration):
77        literal = "EchoEncrResponse"
78        schema = "urn:ZSI:examples"
79        def __init__(self, **kw):
80            ns = urn_ZSI_examples.EchoEncrResponse.schema
81            TClist = [ZSI.TC.String(pname=(ns,"EchoResult"), aname="EchoResult", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
82            kw["pname"] = ("urn:ZSI:examples","EchoEncrResponse")
83            kw["aname"] = "EchoEncrResponse"
84            self.attribute_typecode_dict = {}
85            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
86            class Holder:
87                typecode = self
88                def __init__(self):
89                    # pyclass
90                    self.EchoResult = None
91                    return
92            Holder.__name__ = "EchoEncrResponse_Holder"
93            self.pyclass = Holder
94
95# end class urn_ZSI_examples (tns: urn:ZSI:examples)
Note: See TracBrowser for help on using the repository browser.