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

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

File:
1 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 
Note: See TracChangeset for help on using the changeset viewer.