source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/vocabDefs_services.py @ 2938

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/vocabDefs_services.py@2938
Revision 2938, 4.7 KB checked in by lawrence, 13 years ago (diff)

Provides a test harness for the getrelatedrecords option in
the BODC VocabServer?.

Line 
1##################################################
2# vocabDefs_services.py
3# generated by ZSI.generate.wsdl2python
4##################################################
5
6
7from vocabDefs_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 vocabLocator:
16    vocabPortType_address = "http://vocab.ndg.nerc.ac.uk/vocab"
17    def getvocabPortTypeAddress(self):
18        return vocabLocator.vocabPortType_address
19    def getvocabPortType(self, url=None, **kw):
20        return vocabSoapBindingSOAP(url or vocabLocator.vocabPortType_address, **kw)
21
22# Methods
23class vocabSoapBindingSOAP:
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: whatLists
32    def whatLists(self, request):
33        if isinstance(request, whatListsRequest) is False:
34            raise TypeError, "%s incorrect request type" % (request.__class__)
35        kw = {}
36        # no input wsaction
37        self.binding.Send(None, None, request, soapaction="urn:vocab/defs", **kw)
38        # no output wsaction
39        response = self.binding.Receive(whatListsResponse.typecode)
40        return response
41
42    # op: getList
43    def getList(self, request):
44        if isinstance(request, getListRequest) is False:
45            raise TypeError, "%s incorrect request type" % (request.__class__)
46        kw = {}
47        # no input wsaction
48        self.binding.Send(None, None, request, soapaction="urn:vocab/defs", **kw)
49        # no output wsaction
50        response = self.binding.Receive(getListResponse.typecode)
51        return response
52
53    # op: verifyTerm
54    def verifyTerm(self, request):
55        if isinstance(request, verifyTermRequest) is False:
56            raise TypeError, "%s incorrect request type" % (request.__class__)
57        kw = {}
58        # no input wsaction
59        self.binding.Send(None, None, request, soapaction="urn:vocab/defs", **kw)
60        # no output wsaction
61        response = self.binding.Receive(verifyTermResponse.typecode)
62        return response
63
64    # op: searchVocab
65    def searchVocab(self, request):
66        if isinstance(request, searchVocabRequest) is False:
67            raise TypeError, "%s incorrect request type" % (request.__class__)
68        kw = {}
69        # no input wsaction
70        self.binding.Send(None, None, request, soapaction="urn:vocab/defs", **kw)
71        # no output wsaction
72        response = self.binding.Receive(searchVocabResponse.typecode)
73        return response
74
75    # op: getMap
76    def getMap(self, request):
77        if isinstance(request, getMapRequest) is False:
78            raise TypeError, "%s incorrect request type" % (request.__class__)
79        kw = {}
80        # no input wsaction
81        self.binding.Send(None, None, request, soapaction="urn:vocab/defs", **kw)
82        # no output wsaction
83        response = self.binding.Receive(getMapResponse.typecode)
84        return response
85
86    # op: getRelatedRecord
87    def getRelatedRecord(self, request):
88        if isinstance(request, getRelatedRecordRequest) is False:
89            raise TypeError, "%s incorrect request type" % (request.__class__)
90        kw = {}
91        # no input wsaction
92        self.binding.Send(None, None, request, soapaction="urn:vocab/defs", **kw)
93        # no output wsaction
94        response = self.binding.Receive(getRelatedRecordResponse.typecode)
95        return response
96
97    # op: whatListsCat
98    def whatListsCat(self, request):
99        if isinstance(request, whatListsCatRequest) is False:
100            raise TypeError, "%s incorrect request type" % (request.__class__)
101        kw = {}
102        # no input wsaction
103        self.binding.Send(None, None, request, soapaction="urn:vocab/defs", **kw)
104        # no output wsaction
105        response = self.binding.Receive(whatListsCatResponse.typecode)
106        return response
107
108whatListsRequest = ns0.whatLists_Dec().pyclass
109
110whatListsResponse = ns0.whatListsResponse_Dec().pyclass
111
112getListRequest = ns0.getList_Dec().pyclass
113
114getListResponse = ns0.getListResponse_Dec().pyclass
115
116verifyTermRequest = ns0.verifyTerm_Dec().pyclass
117
118verifyTermResponse = ns0.verifyTermResponse_Dec().pyclass
119
120searchVocabRequest = ns0.searchVocab_Dec().pyclass
121
122searchVocabResponse = ns0.searchVocabResponse_Dec().pyclass
123
124getMapRequest = ns0.getMap_Dec().pyclass
125
126getMapResponse = ns0.getMapResponse_Dec().pyclass
127
128getRelatedRecordRequest = ns0.getRelatedRecord_Dec().pyclass
129
130getRelatedRecordResponse = ns0.getRelatedRecordResponse_Dec().pyclass
131
132whatListsCatRequest = ns0.whatListsCat_Dec().pyclass
133
134whatListsCatResponse = ns0.whatListsCatResponse_Dec().pyclass
Note: See TracBrowser for help on using the repository browser.