source: TI12-security/trunk/python/Tests/VocabServer/VocabServerAPI_dlService_client.py @ 1546

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/Tests/VocabServer/VocabServerAPI_dlService_client.py@4692
Revision 1546, 4.4 KB checked in by pjkersha, 14 years ago (diff)

Tests/VocabServer?:
Working version for whatListsCat method. ZSI code connects to Java WS with doc/lit wrapped WSDL. Note,
urllib2Client adaptor for ZSI client to work across a http proxy.

Tests/Echo?: corrected http_proxy -> http keyword in proxies dictionary of ProxyHandler?.

Line 
1##################################################
2# VocabServerAPI_dlService_client.py
3# generated by ZSI.generate.wsdl2python
4##################################################
5
6
7
8import urlparse, types
9from ZSI.TCcompound import ComplexType, Struct
10from ZSI import client
11import ZSI
12
13from VocabServerAPI_dlService_messages import *
14from urllib2Client import URLlib2Binding
15
16# Locator
17class VocabServerAPI_dlServiceLocator:
18    VocabServerAPI_dl_address = "http://grid.bodc.nerc.ac.uk/axis/services/VocabServerAPI_dl"
19    def getVocabServerAPI_dlAddress(self):
20        return VocabServerAPI_dlServiceLocator.VocabServerAPI_dl_address
21    def getVocabServerAPI_dl(self, url=None, **kw):
22        return VocabServerAPI_dlSoapBindingSOAP(url or VocabServerAPI_dlServiceLocator.VocabServerAPI_dl_address, **kw)
23
24# Methods
25class VocabServerAPI_dlSoapBindingSOAP:
26    def __init__(self, url, **kw):
27        kw.setdefault("readerclass", None)
28        kw.setdefault("writerclass", None)
29        # no resource properties
30        #self.binding = client.Binding(url=url, **kw)
31        self.binding = URLlib2Binding(url=url, **kw)
32        # no ws-addressing
33
34    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6d67c8c>
35    def whatLists(self, in0):
36
37        request = whatListsRequest()
38        request.in0 = in0
39
40        kw = {}
41        # no input wsaction
42        self.binding.Send(None, None, request, soapaction="", **kw)
43        # no output wsaction
44        response = self.binding.Receive(whatListsResponse.typecode)
45        whatListsReturn = response.whatListsReturn
46        return whatListsReturn
47
48    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6d6cb0c>
49    def getList(self, in0,in1,in2):
50
51        request = getListRequest()
52        request.in0 = in0
53        request.in1 = in1
54        request.in2 = in2
55
56        kw = {}
57        # no input wsaction
58        self.binding.Send(None, None, request, soapaction="", **kw)
59        # no output wsaction
60        response = self.binding.Receive(getListResponse.typecode)
61        getListReturn = response.getListReturn
62        return getListReturn
63
64    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6d67b0c>
65    def verifyTerm(self, in0,in1,in2):
66
67        request = verifyTermRequest()
68        request.in0 = in0
69        request.in1 = in1
70        request.in2 = in2
71
72        kw = {}
73        # no input wsaction
74        self.binding.Send(None, None, request, soapaction="", **kw)
75        # no output wsaction
76        response = self.binding.Receive(verifyTermResponse.typecode)
77        verifyTermReturn = response.verifyTermReturn
78        return verifyTermReturn
79
80    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6d6ceec>
81    def pvMap(self, in0,in1,in2):
82
83        request = pvMapRequest()
84        request.in0 = in0
85        request.in1 = in1
86        request.in2 = in2
87
88        kw = {}
89        # no input wsaction
90        self.binding.Send(None, None, request, soapaction="", **kw)
91        # no output wsaction
92        response = self.binding.Receive(pvMapResponse.typecode)
93        pvMapReturn = response.pvMapReturn
94        return pvMapReturn
95
96    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6d742ec>
97    def getPhenomDict(self, in0):
98
99        request = getPhenomDictRequest()
100        request.in0 = in0
101
102        kw = {}
103        # no input wsaction
104        self.binding.Send(None, None, request, soapaction="", **kw)
105        # no output wsaction
106        response = self.binding.Receive(getPhenomDictResponse.typecode)
107        getPhenomDictReturn = response.getPhenomDictReturn
108        return getPhenomDictReturn
109
110    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6d6cd6c>
111    def whatListsCat(self):
112
113        request = whatListsCatRequest()
114
115        kw = {}
116        # no input wsaction
117        self.binding.Send(None, None, request, soapaction="", **kw)
118        # no output wsaction
119        response = self.binding.Receive(whatListsCatResponse.typecode)
120        whatListsCatReturn = response.whatListsCatReturn
121        return whatListsCatReturn
122
123    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6d7420c>
124    def searchVocab(self, in0,in1,in2):
125
126        request = searchVocabRequest()
127        request.in0 = in0
128        request.in1 = in1
129        request.in2 = in2
130
131        kw = {}
132        # no input wsaction
133        self.binding.Send(None, None, request, soapaction="", **kw)
134        # no output wsaction
135        response = self.binding.Receive(searchVocabResponse.typecode)
136        searchVocabReturn = response.searchVocabReturn
137        return searchVocabReturn
Note: See TracBrowser for help on using the repository browser.