source: TI12-security/trunk/NDGSecurity/python/Tests/AttAuthority/AttAuthority_services.py @ 7080

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDGSecurity/python/Tests/AttAuthority/AttAuthority_services.py@7080
Revision 7080, 3.2 KB checked in by pjkersha, 9 years ago (diff)
  • Property svn:keywords set to Id
Line 
1##################################################
2# ndg.security.common.zsi.attributeauthority.AttAuthority_services.py
3# generated by ZSI.generate.wsdl2python
4##################################################
5
6
7from ndg.security.common.zsi.attributeauthority.AttAuthority_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 AttAuthorityServiceLocator:
16    AttAuthority_address = "http://localhost:5700"
17    def getAttAuthorityAddress(self):
18        return AttAuthorityServiceLocator.AttAuthority_address
19    def getAttAuthority(self, url=None, **kw):
20        return AttAuthorityBindingSOAP(url or AttAuthorityServiceLocator.AttAuthority_address, **kw)
21
22# Methods
23class AttAuthorityBindingSOAP:
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 0xb7850dac>
32    def getAttCert(self, userCert):
33
34        request = getAttCertInputMsg()
35        request._userCert = userCert
36
37        kw = {}
38        # no input wsaction
39        self.binding.Send(None, None, request, soapaction="getAttCert", **kw)
40        # no output wsaction
41        response = self.binding.Receive(getAttCertOutputMsg.typecode)
42        attCert = response._attCert
43        return attCert
44
45    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb785526c>
46    def getHostInfo(self):
47
48        request = getHostInfoInputMsg()
49
50        kw = {}
51        # no input wsaction
52        self.binding.Send(None, None, request, soapaction="getHostInfo", **kw)
53        # no output wsaction
54        response = self.binding.Receive(getHostInfoOutputMsg.typecode)
55        return 
56
57    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb7855a0c>
58    def getTrustedHostInfo(self, role):
59
60        request = getTrustedHostInfoInputMsg()
61        request._role = role
62
63        kw = {}
64        # no input wsaction
65        self.binding.Send(None, None, request, soapaction="getTrustedHostInfo", **kw)
66        # no output wsaction
67        response = self.binding.Receive(getTrustedHostInfoOutputMsg.typecode)
68        trustedHosts = response._trustedHosts
69        return trustedHosts
70
71    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb7855b8c>
72    def getCert(self):
73
74        request = getPubKeyInputMsg()
75
76        kw = {}
77        # no input wsaction
78        self.binding.Send(None, None, request, soapaction="getPubKey", **kw)
79        # no output wsaction
80        response = self.binding.Receive(getPubKeyOutputMsg.typecode)
81        x509Cert = response._x509Cert
82        return x509Cert
83
84getAttCertInputMsg = ns0.getAttCert_Dec().pyclass
85
86getAttCertOutputMsg = ns0.getAttCertResponse_Dec().pyclass
87
88getHostInfoInputMsg = ns0.getHostInfo_Dec().pyclass
89
90getHostInfoOutputMsg = ns0.getHostInfoResponse_Dec().pyclass
91
92getTrustedHostInfoInputMsg = ns0.getTrustedHostInfo_Dec().pyclass
93
94getTrustedHostInfoOutputMsg = ns0.getTrustedHostInfoResponse_Dec().pyclass
95
96getPubKeyInputMsg = ns0.getPubKey_Dec().pyclass
97
98getPubKeyOutputMsg = ns0.getPubKeyResponse_Dec().pyclass
Note: See TracBrowser for help on using the repository browser.