Changeset 5748 for ndgCommon


Ignore:
Timestamp:
22/09/09 12:53:47 (10 years ago)
Author:
sdonegan
Message:

replaced hardcoded url for discovery service API - caused huge problems, should be fixed...

File:
1 edited

Legend:

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

    r5304 r5748  
    2626# Locator (this mimics the code which lives in the wsdl2py generated DiscoveryService_services, 
    2727# but explicitly allows a different port address) ... 
    28 default_HostAndPort="http://ndg.badc.rl.ac.uk:8080/axis2/services/DiscoveryService" 
     28#default_HostAndPort="http://ndg.badc.rl.ac.uk:8080/axis2/services/DiscoveryService" 
     29default_HostAndPort="http://ndg3beta.badc.rl.ac.uk:8080/axis2/services/DiscoveryService" 
    2930 
    3031class DiscoveryServiceClient(InterfaceSearchClient): 
     
    3334    ''' 
    3435     
    35     def __init__(self, tracefile=None, HostAndPort=default_HostAndPort): 
     36    def __init__(self, tracefile=None, HostAndPort=None): 
    3637        '''Get an instance of the NDG Discovery Service.  
    3738            Optional Keywords are:  
    3839                tracefile - for collecting debug output 
    39                 HostAndPort - the location of the SOAP web service (default is ndg Glue) 
     40                HostAndPort - the location of the SOAP web service (default is ndg Glue) !crap! P.I.A. 
    4041        ''' 
    4142        #Get a different backend provider via the url argument 
     43         
     44        if not HostAndPort: 
     45            logging.info("Discovery service API URL not supplied by calling method so using: " + default_HostAndPort) 
     46            HostAndPort = default_HostAndPort 
     47         
    4248        loc=DiscoveryServiceLocator() 
    4349        self.server=loc.getDiscoveryServicePortType(url=HostAndPort, 
     
    276282        for i in indices: 
    277283            ff=os.path.splitext(self.documents[i]) 
     284            print "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% " + ff[0] 
    278285            results.append((ff[0],responses[i])) 
    279286        logging.info("Documents retrieved") 
Note: See TracChangeset for help on using the changeset viewer.