Changeset 6712


Ignore:
Timestamp:
09/03/10 17:10:36 (10 years ago)
Author:
sdonegan
Message:

Add updated discovery service handling of changed API xsd to allow for client IP handling

Location:
ndgCommon/trunk/ndg/common/src/clients/ws/discovery/generated
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/src/clients/ws/discovery/generated/DiscoveryService_services.py

    r5006 r6712  
    1010from ZSI import client 
    1111import ZSI 
    12 from ZSI.generate.pyclass import pyclass_type 
    1312 
    1413# Locator 
    1514class DiscoveryServiceLocator: 
    16     DiscoveryServicePortType_address = "http://glue.badc.rl.ac.uk:8080/axis2/services/DiscoveryService" 
    17     def getDiscoveryServicePortTypeAddress(self): 
    18         return DiscoveryServiceLocator.DiscoveryServicePortType_address 
    19     def getDiscoveryServicePortType(self, url=None, **kw): 
    20         return DiscoveryServiceSOAP11BindingSOAP(url or DiscoveryServiceLocator.DiscoveryServicePortType_address, **kw) 
     15    Discovery_address = "http://130.246.191.164:8080/axis2/services/DiscoveryService/" 
     16    def getDiscoveryAddress(self): 
     17        return DiscoveryServiceLocator.Discovery_address 
     18    def getDiscovery(self, url=None, **kw): 
     19        return DiscoverySoapBindingSOAP(url or DiscoveryServiceLocator.Discovery_address, **kw) 
    2120 
    2221# Methods 
    23 class DiscoveryServiceSOAP11BindingSOAP: 
     22class DiscoverySoapBindingSOAP: 
    2423    def __init__(self, url, **kw): 
    2524        kw.setdefault("readerclass", None) 
     
    2928        # no ws-addressing 
    3029 
     30    # op: doSearch 
     31    def doSearch(self, request): 
     32        if isinstance(request, doSearchRequest) is False: 
     33            raise TypeError, "%s incorrect request type" % (request.__class__) 
     34        kw = {} 
     35        # no input wsaction 
     36        self.binding.Send(None, None, request, soapaction="None", **kw) 
     37        # no output wsaction 
     38        response = self.binding.Receive(doSearchResponse.typecode) 
     39        return response 
     40 
     41    # op: doPresent 
     42    def doPresent(self, request): 
     43        if isinstance(request, doPresentRequest) is False: 
     44            raise TypeError, "%s incorrect request type" % (request.__class__) 
     45        kw = {} 
     46        # no input wsaction 
     47        self.binding.Send(None, None, request, soapaction="None", **kw) 
     48        # no output wsaction 
     49        response = self.binding.Receive(doPresentResponse.typecode) 
     50        return response 
     51 
    3152    # op: getListNames 
    3253    def getListNames(self, request): 
     
    3556        kw = {} 
    3657        # no input wsaction 
    37         self.binding.Send(None, None, request, soapaction="urn:DiscoveryServiceAPI:Discovery:getListNamesRequest", **kw) 
     58        self.binding.Send(None, None, request, soapaction="None", **kw) 
    3859        # no output wsaction 
    3960        response = self.binding.Receive(getListNamesResponse.typecode) 
     
    4667        kw = {} 
    4768        # no input wsaction 
    48         self.binding.Send(None, None, request, soapaction="urn:DiscoveryServiceAPI:Discovery:getListRequest", **kw) 
     69        self.binding.Send(None, None, request, soapaction="None", **kw) 
    4970        # no output wsaction 
    5071        response = self.binding.Receive(getListResponse.typecode) 
    5172        return response 
    5273 
    53     # op: doSearch 
    54     def doSearch(self, request): 
    55         if isinstance(request, doSearchRequest) 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:DiscoveryServiceAPI:Discovery:doSearchRequest", **kw) 
    60         # no output wsaction 
    61         response = self.binding.Receive(doSearchResponse.typecode) 
    62         return response 
     74doSearchRequest = ns0.doSearch_Dec().pyclass 
    6375 
    64     # op: doPresent 
    65     def doPresent(self, request): 
    66         if isinstance(request, doPresentRequest) 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:DiscoveryServiceAPI:Discovery:doPresentRequest", **kw) 
    71         # no output wsaction 
    72         response = self.binding.Receive(doPresentResponse.typecode) 
    73         return response 
     76doSearchResponse = ns0.doSearchReturn_Dec().pyclass 
     77 
     78doPresentRequest = ns0.doPresent_Dec().pyclass 
     79 
     80doPresentResponse = ns0.doPresentReturn_Dec().pyclass 
    7481 
    7582getListNamesRequest = ns0.getListNames_Dec().pyclass 
     
    8087 
    8188getListResponse = ns0.getListReturn_Dec().pyclass 
    82  
    83 doSearchRequest = ns0.doSearch_Dec().pyclass 
    84  
    85 doSearchResponse = ns0.doSearchReturn_Dec().pyclass 
    86  
    87 doPresentRequest = ns0.doPresent_Dec().pyclass 
    88  
    89 doPresentResponse = ns0.doPresentReturn_Dec().pyclass 
  • ndgCommon/trunk/ndg/common/src/clients/ws/discovery/generated/DiscoveryService_services_types.py

    r5006 r6712  
    88import ZSI.TCcompound 
    99from ZSI.schema import LocalElementDeclaration, ElementDeclaration, TypeDefinition, GTD, GED 
    10 from ZSI.generate.pyclass import pyclass_type 
    1110 
    1211############################## 
     
    2928            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    3029            class Holder: 
    31                 __metaclass__ = pyclass_type 
    3230                typecode = self 
    3331                def __init__(self): 
     
    4442        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    4543            ns = ns0.SearchType_Def.schema 
    46             TClist = [ZSI.TC.String(pname=(ns,"term"), aname="_term", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"termType"), aname="_termType", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.IpositiveInteger(pname=(ns,"start"), aname="_start", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.IpositiveInteger(pname=(ns,"howMany"), aname="_howMany", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"orderBy"), aname="_orderBy", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","orderByDirectionType",lazy=False)(pname=(ns,"orderByDirection"), aname="_orderByDirection", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"scope"), aname="_scope", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"spatialOperator"), aname="_spatialOperator", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","BoundingBoxType",lazy=False)(pname=(ns,"BoundingBox"), aname="_BoundingBox", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"temporalOperator"), aname="_temporalOperator", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","DateRangeType",lazy=False)(pname=(ns,"DateRange"), aname="_DateRange", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
    47             self.attribute_typecode_dict = attributes or {} 
    48             if extend: TClist += ofwhat 
    49             if restrict: TClist = ofwhat 
    50             ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    51             class Holder: 
    52                 __metaclass__ = pyclass_type 
     44            TClist = [ZSI.TC.String(pname=(ns,"term"), aname="_term", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"termType"), aname="_termType", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.IpositiveInteger(pname=(ns,"start"), aname="_start", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TCnumbers.IpositiveInteger(pname=(ns,"howMany"), aname="_howMany", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"orderBy"), aname="_orderBy", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","orderByDirectionType",lazy=False)(pname=(ns,"orderByDirection"), aname="_orderByDirection", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"scope"), aname="_scope", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"spatialOperator"), aname="_spatialOperator", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","BoundingBoxType",lazy=False)(pname=(ns,"BoundingBox"), aname="_BoundingBox", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"temporalOperator"), aname="_temporalOperator", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:DiscoveryServiceAPI","DateRangeType",lazy=False)(pname=(ns,"DateRange"), aname="_DateRange", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"client"), aname="_client", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))] 
     45            self.attribute_typecode_dict = attributes or {} 
     46            if extend: TClist += ofwhat 
     47            if restrict: TClist = ofwhat 
     48            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     49            class Holder: 
    5350                typecode = self 
    5451                def __init__(self): 
     
    6562                    self._temporalOperator = None 
    6663                    self._DateRange = None 
     64                    self._client = None 
    6765                    return 
    6866            Holder.__name__ = "SearchType_Holder" 
     
    8078            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    8179            class Holder: 
    82                 __metaclass__ = pyclass_type 
    8380                typecode = self 
    8481                def __init__(self): 
     
    10097            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    10198            class Holder: 
    102                 __metaclass__ = pyclass_type 
    10399                typecode = self 
    104100                def __init__(self): 
     
    122118            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    123119            class Holder: 
    124                 __metaclass__ = pyclass_type 
    125120                typecode = self 
    126121                def __init__(self): 
     
    140135        def __init__(self, pname, ofwhat=(), attributes=None, extend=False, restrict=False, **kw): 
    141136            ns = ns0.getListNamesReturnType_Def.schema 
    142             TClist = [self.__class__.listNames_Dec(minOccurs=1, maxOccurs=1, nillable=False, encoded=kw.get("encoded"))] 
    143             self.attribute_typecode_dict = attributes or {} 
    144             if extend: TClist += ofwhat 
    145             if restrict: TClist = ofwhat 
    146             ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    147             class Holder: 
    148                 __metaclass__ = pyclass_type 
    149                 typecode = self 
    150                 def __init__(self): 
    151                     # pyclass 
    152                     self._listNames = None 
     137            TClist = [self.__class__.listNames_Dec(minOccurs=1, maxOccurs="unbounded", nillable=False, encoded=kw.get("encoded"))] 
     138            self.attribute_typecode_dict = attributes or {} 
     139            if extend: TClist += ofwhat 
     140            if restrict: TClist = ofwhat 
     141            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
     142            class Holder: 
     143                typecode = self 
     144                def __init__(self): 
     145                    # pyclass 
     146                    self._listNames = [] 
    153147                    return 
    154148            Holder.__name__ = "getListNamesReturnType_Holder" 
     
    167161                ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw) 
    168162                class Holder: 
    169                     __metaclass__ = pyclass_type 
    170163                    typecode = self 
    171164                    def __init__(self): 
     
    190183            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    191184            class Holder: 
    192                 __metaclass__ = pyclass_type 
    193185                typecode = self 
    194186                def __init__(self): 
     
    213205                self.attribute_typecode_dict["name"] = ZSI.TC.String() 
    214206                class Holder: 
    215                     __metaclass__ = pyclass_type 
    216207                    typecode = self 
    217208                    def __init__(self): 
     
    236227            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    237228            class Holder: 
    238                 __metaclass__ = pyclass_type 
    239229                typecode = self 
    240230                def __init__(self): 
     
    259249            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    260250            class Holder: 
    261                 __metaclass__ = pyclass_type 
    262251                typecode = self 
    263252                def __init__(self): 
     
    280269            ZSI.TCcompound.ComplexType.__init__(self, None, TClist, pname=pname, inorder=0, **kw) 
    281270            class Holder: 
    282                 __metaclass__ = pyclass_type 
    283271                typecode = self 
    284272                def __init__(self): 
Note: See TracChangeset for help on using the changeset viewer.