source: TI12-security/trunk/python/Tests/AttAuthority/AttAuthority_services_types.py @ 1696

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/Tests/AttAuthority/AttAuthority_services_types.py@5907
Revision 1696, 7.5 KB checked in by pjkersha, 14 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# AttAuthority_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
10from ZSI.generate.pyclass import pyclass_type
11
12##############################
13# targetNamespace
14# urn:ndg:security
15##############################
16
17class ns0:
18    targetNamespace = "urn:ndg:security"
19
20    class getAttCert_Dec(ZSI.TCcompound.ComplexType, ElementDeclaration):
21        literal = "getAttCert"
22        schema = "urn:ndg:security"
23        def __init__(self, **kw):
24            ns = ns0.getAttCert_Dec.schema
25            TClist = [ZSI.TC.String(pname="userCert", aname="_userCert", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
26            kw["pname"] = ("urn:ndg:security","getAttCert")
27            kw["aname"] = "_getAttCert"
28            self.attribute_typecode_dict = {}
29            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
30            class Holder:
31                __metaclass__ = pyclass_type
32                typecode = self
33                def __init__(self):
34                    # pyclass
35                    self._userCert = None
36                    return
37            Holder.__name__ = "getAttCert_Holder"
38            self.pyclass = Holder
39
40    class getAttCertResponse_Dec(ZSI.TCcompound.ComplexType, ElementDeclaration):
41        literal = "getAttCertResponse"
42        schema = "urn:ndg:security"
43        def __init__(self, **kw):
44            ns = ns0.getAttCertResponse_Dec.schema
45            TClist = [ZSI.TC.String(pname="attCert", aname="_attCert", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
46            kw["pname"] = ("urn:ndg:security","getAttCertResponse")
47            kw["aname"] = "_getAttCertResponse"
48            self.attribute_typecode_dict = {}
49            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
50            class Holder:
51                __metaclass__ = pyclass_type
52                typecode = self
53                def __init__(self):
54                    # pyclass
55                    self._attCert = None
56                    return
57            Holder.__name__ = "getAttCertResponse_Holder"
58            self.pyclass = Holder
59
60    class getHostInfo_Dec(ZSI.TCcompound.ComplexType, ElementDeclaration):
61        literal = "getHostInfo"
62        schema = "urn:ndg:security"
63        def __init__(self, **kw):
64            ns = ns0.getHostInfo_Dec.schema
65            TClist = []
66            kw["pname"] = ("urn:ndg:security","getHostInfo")
67            kw["aname"] = "_getHostInfo"
68            self.attribute_typecode_dict = {}
69            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
70            class Holder:
71                __metaclass__ = pyclass_type
72                typecode = self
73                def __init__(self):
74                    # pyclass
75                    return
76            Holder.__name__ = "getHostInfo_Holder"
77            self.pyclass = Holder
78
79    class getHostInfoResponse_Dec(ZSI.TCcompound.ComplexType, ElementDeclaration):
80        literal = "getHostInfoResponse"
81        schema = "urn:ndg:security"
82        def __init__(self, **kw):
83            ns = ns0.getHostInfoResponse_Dec.schema
84            TClist = []
85            kw["pname"] = ("urn:ndg:security","getHostInfoResponse")
86            kw["aname"] = "_getHostInfoResponse"
87            self.attribute_typecode_dict = {}
88            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
89            class Holder:
90                __metaclass__ = pyclass_type
91                typecode = self
92                def __init__(self):
93                    # pyclass
94                    return
95            Holder.__name__ = "getHostInfoResponse_Holder"
96            self.pyclass = Holder
97
98    class getTrustedHostInfo_Dec(ZSI.TCcompound.ComplexType, ElementDeclaration):
99        literal = "getTrustedHostInfo"
100        schema = "urn:ndg:security"
101        def __init__(self, **kw):
102            ns = ns0.getTrustedHostInfo_Dec.schema
103            TClist = [ZSI.TC.String(pname="role", aname="_role", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
104            kw["pname"] = ("urn:ndg:security","getTrustedHostInfo")
105            kw["aname"] = "_getTrustedHostInfo"
106            self.attribute_typecode_dict = {}
107            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
108            class Holder:
109                __metaclass__ = pyclass_type
110                typecode = self
111                def __init__(self):
112                    # pyclass
113                    self._role = None
114                    return
115            Holder.__name__ = "getTrustedHostInfo_Holder"
116            self.pyclass = Holder
117
118    class getTrustedHostInfoResponse_Dec(ZSI.TCcompound.ComplexType, ElementDeclaration):
119        literal = "getTrustedHostInfoResponse"
120        schema = "urn:ndg:security"
121        def __init__(self, **kw):
122            ns = ns0.getTrustedHostInfoResponse_Dec.schema
123            TClist = [ZSI.TC.String(pname="trustedHosts", aname="_trustedHosts", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
124            kw["pname"] = ("urn:ndg:security","getTrustedHostInfoResponse")
125            kw["aname"] = "_getTrustedHostInfoResponse"
126            self.attribute_typecode_dict = {}
127            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
128            class Holder:
129                __metaclass__ = pyclass_type
130                typecode = self
131                def __init__(self):
132                    # pyclass
133                    self._trustedHosts = None
134                    return
135            Holder.__name__ = "getTrustedHostInfoResponse_Holder"
136            self.pyclass = Holder
137
138    class getPubKey_Dec(ZSI.TCcompound.ComplexType, ElementDeclaration):
139        literal = "getPubKey"
140        schema = "urn:ndg:security"
141        def __init__(self, **kw):
142            ns = ns0.getPubKey_Dec.schema
143            TClist = []
144            kw["pname"] = ("urn:ndg:security","getPubKey")
145            kw["aname"] = "_getPubKey"
146            self.attribute_typecode_dict = {}
147            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
148            class Holder:
149                __metaclass__ = pyclass_type
150                typecode = self
151                def __init__(self):
152                    # pyclass
153                    return
154            Holder.__name__ = "getPubKey_Holder"
155            self.pyclass = Holder
156
157    class getPubKeyResponse_Dec(ZSI.TCcompound.ComplexType, ElementDeclaration):
158        literal = "getPubKeyResponse"
159        schema = "urn:ndg:security"
160        def __init__(self, **kw):
161            ns = ns0.getPubKeyResponse_Dec.schema
162            TClist = [ZSI.TC.String(pname="x509Cert", aname="_x509Cert", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
163            kw["pname"] = ("urn:ndg:security","getPubKeyResponse")
164            kw["aname"] = "_getPubKeyResponse"
165            self.attribute_typecode_dict = {}
166            ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
167            class Holder:
168                __metaclass__ = pyclass_type
169                typecode = self
170                def __init__(self):
171                    # pyclass
172                    self._x509Cert = None
173                    return
174            Holder.__name__ = "getPubKeyResponse_Holder"
175            self.pyclass = Holder
176
177# end class ns0 (tns: urn:ndg:security)
Note: See TracBrowser for help on using the repository browser.