1 | ################################################## |
---|
2 | # AttributeAuthority_services.py |
---|
3 | # generated by ZSI.generate.wsdl2python |
---|
4 | ################################################## |
---|
5 | |
---|
6 | |
---|
7 | from AttributeAuthority_services_types import * |
---|
8 | import urlparse, types |
---|
9 | from ZSI.TCcompound import ComplexType, Struct |
---|
10 | from ZSI import client |
---|
11 | import ZSI |
---|
12 | from ZSI.generate.pyclass import pyclass_type |
---|
13 | |
---|
14 | # Locator |
---|
15 | class AttributeAuthorityServiceLocator: |
---|
16 | AttributeAuthority_address = "http://localhost:5000" |
---|
17 | def getAttributeAuthorityAddress(self): |
---|
18 | return AttributeAuthorityServiceLocator.AttributeAuthority_address |
---|
19 | def getAttributeAuthority(self, url=None, **kw): |
---|
20 | return AttributeAuthorityBindingSOAP(url or AttributeAuthorityServiceLocator.AttributeAuthority_address, **kw) |
---|
21 | |
---|
22 | # Methods |
---|
23 | class AttributeAuthorityBindingSOAP: |
---|
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 0x84fc98c> |
---|
32 | def getAttCert(self, userId,userX509Cert,userAttCert): |
---|
33 | |
---|
34 | request = getAttCertInputMsg() |
---|
35 | request._userId = userId |
---|
36 | request._userX509Cert = userX509Cert |
---|
37 | request._userAttCert = userAttCert |
---|
38 | |
---|
39 | kw = {} |
---|
40 | # no input wsaction |
---|
41 | self.binding.Send(None, None, request, soapaction="getAttCert", **kw) |
---|
42 | # no output wsaction |
---|
43 | response = self.binding.Receive(getAttCertOutputMsg.typecode) |
---|
44 | attCert = response._attCert |
---|
45 | msg = response._msg |
---|
46 | return attCert,msg |
---|
47 | |
---|
48 | # op: <ZSI.wstools.WSDLTools.Message instance at 0x84fccac> |
---|
49 | def getHostInfo(self): |
---|
50 | |
---|
51 | request = getHostInfoInputMsg() |
---|
52 | |
---|
53 | kw = {} |
---|
54 | # no input wsaction |
---|
55 | self.binding.Send(None, None, request, soapaction="getHostInfo", **kw) |
---|
56 | # no output wsaction |
---|
57 | response = self.binding.Receive(getHostInfoOutputMsg.typecode) |
---|
58 | hostname = response._hostname |
---|
59 | aaURI = response._aaURI |
---|
60 | aaDN = response._aaDN |
---|
61 | loginURI = response._loginURI |
---|
62 | loginServerDN = response._loginServerDN |
---|
63 | loginRequestServerDN = response._loginRequestServerDN |
---|
64 | return hostname,aaURI,aaDN,loginURI,loginServerDN,loginRequestServerDN |
---|
65 | |
---|
66 | # op: <ZSI.wstools.WSDLTools.Message instance at 0x85037ec> |
---|
67 | def getTrustedHostInfo(self, role): |
---|
68 | |
---|
69 | request = getTrustedHostInfoInputMsg() |
---|
70 | request._role = role |
---|
71 | |
---|
72 | kw = {} |
---|
73 | # no input wsaction |
---|
74 | self.binding.Send(None, None, request, soapaction="getTrustedHostInfo", **kw) |
---|
75 | # no output wsaction |
---|
76 | response = self.binding.Receive(getTrustedHostInfoOutputMsg.typecode) |
---|
77 | trustedHosts = response._trustedHosts |
---|
78 | return trustedHosts |
---|
79 | |
---|
80 | # op: <ZSI.wstools.WSDLTools.Message instance at 0x850396c> |
---|
81 | def getAllHostsInfo(self): |
---|
82 | |
---|
83 | request = getAllHostsInfoInputMsg() |
---|
84 | |
---|
85 | kw = {} |
---|
86 | # no input wsaction |
---|
87 | self.binding.Send(None, None, request, soapaction="getAllHostsInfo", **kw) |
---|
88 | # no output wsaction |
---|
89 | response = self.binding.Receive(getAllHostsInfoOutputMsg.typecode) |
---|
90 | hosts = response._hosts |
---|
91 | return hosts |
---|
92 | |
---|
93 | getAttCertInputMsg = ns0.getAttCert_Dec().pyclass |
---|
94 | |
---|
95 | getAttCertOutputMsg = ns0.getAttCertResponse_Dec().pyclass |
---|
96 | |
---|
97 | getHostInfoInputMsg = ns0.getHostInfo_Dec().pyclass |
---|
98 | |
---|
99 | getHostInfoOutputMsg = ns0.getHostInfoResponse_Dec().pyclass |
---|
100 | |
---|
101 | getTrustedHostInfoInputMsg = ns0.getTrustedHostInfo_Dec().pyclass |
---|
102 | |
---|
103 | getTrustedHostInfoOutputMsg = ns0.getTrustedHostInfoResponse_Dec().pyclass |
---|
104 | |
---|
105 | getAllHostsInfoInputMsg = ns0.getAllHostsInfo_Dec().pyclass |
---|
106 | |
---|
107 | getAllHostsInfoOutputMsg = ns0.getAllHostsInfoResponse_Dec().pyclass |
---|