Changeset 15733

Show
Ignore:
Timestamp:
27.05.2008 18:07:16 (12 years ago)
Author:
ak19
Message:

gsearchWSDLSuffix rather than the entire gsearchWSDLURL is now written to the properties file. Otherwise, the program always ends up reading whatever wsdlURL was in the file for gsearch, rather than using the baseURL of Fedora

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/trunk/gs3-webservices-democlient/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Connection.java

    r15672 r15733  
    7070    private static final Logger LOG = Logger.getLogger( 
    7171            FedoraGS3Connection.class.getName()); 
    72      
    73     /** The last part of the gSearchWSDL URL. The first part is 
    74      * the same as the fedora server's base url. */ 
    75     protected static final String gSearchWSDLSuffix 
    76         = "gsearch/services/FgsOperations?wsdl"; 
    77      
     72         
    7873    /** Complete list of services that are supported our FedoraGS3 would   
    7974     * support if everything goes well. If a connection to FedoraGSearch 
     
    109104     * concatenated to "gsearch/services/FgsOperations?wsdl" */ 
    110105    protected String gSearchWSDLURL; 
    111      
     106         
     107    /** The last part of the gSearchWSDL URL. The first part is 
     108     * the same as the fedora server's base url. */ 
     109        protected String gSearchWSDLSuffix; 
     110             
    112111    /** The name of the index that FedoraGSearch will index the GS3 
    113112     * documents into. If no name is specified in the properties file, 
     
    179178     * properties loaded from a propertiesFile. This method is overridden   
    180179     * here in order to instantiate the gSearchConnection based on the   
    181      * - gSearchWSDLURL (If one was not provided in the properties file,   
    182      * gSearchWSDLURL defaults to something of the form 
    183      * "http://localhost:8080/fedoragsearch/services/FgsOperations?wsdl" 
    184      * where http://localhost:8080/fedora is the baseURL of fedora and 
    185      * "gsearch/services/FgsOperations?wsdl" is the default gSearchWSDLSuffix.) 
     180     * - gSearchWSDLSuffix that will be appended to the fedora base url. 
     181     * (If one was not provided in the properties file, gSearchWSDLURL defaults  
     182     * to something of the form 
     183     * "http://<fedorahost:port>/fedoragsearch/services/FgsOperations?wsdl" 
     184     * which is the baseURL of fedora concatenated to the default gSearchWSDLSuffix, 
     185     * "gsearch/services/FgsOperations?wsdl". 
    186186     * - name of the index into which the GS3 documents have been indexed  
    187187     * and which FedoraGenericSearch should use to perform searches. If none is 
     
    189189     * @param properties is the Properties Map loaded from a properties file 
    190190     * (if there was any) which specifies such things as host and port of the 
    191      * FedoraServer, but can also specify the property "gsearch.wsdlURL". 
    192      * At the end of this method, properties' "gsearch.wsdlURL" will be set 
    193      * to whatever the final value of this.gSearchWSDLURL is, and  
     191     * FedoraServer, but can also specify the property "gsearch.wsdlURL.suffix". 
     192     * At the end of this method, properties' "gsearch.wsdlURL.suffix" will be set 
     193     * to whatever the final value of this.gSearchWSDLURL' suffix is, and  
    194194     * "gsearch.indexName" will be set to to whatever the final value of 
    195195     * this.gSearchIndexName is.  
     
    201201    { 
    202202        super.setInitialisationProperties(properties); 
    203         // gsearchWSDL URL, if not specified, defaults to something of the form: 
    204         // "http://localhost:8080/fedoragsearch/services/FgsOperations?wsdl" 
    205         // where http://localhost:8080/fedora is the baseURL of fedora 
    206         this.gSearchWSDLURL = properties.getProperty( 
    207                 "gsearch.wsdlURL", this.baseURL+gSearchWSDLSuffix); 
     203        // gsearchWSDL URL suffix, if not specified, defaults to  
     204        // "fedoragsearch/services/FgsOperations?wsdl" which is  
     205        // concatenated to the baseURL of fedora to give the gsearchWSDLURL. 
     206        this.gSearchWSDLSuffix = properties.getProperty( 
     207            "gsearch.wsdlURL.suffix", "gsearch/services/FgsOperations?wsdl"); 
     208        this.gSearchWSDLURL = this.baseURL + this.gSearchWSDLSuffix; 
    208209        // Set the property to whatever this.gSearchWSDLURL is now, 
    209210        // so that it will be written out to the properties file again 
    210         properties.setProperty("gsearch.wsdlURL", this.gSearchWSDLURL); 
     211        properties.setProperty("gsearch.wsdlURL.suffix", this.gSearchWSDLSuffix); 
    211212         
    212213        // Similarly for the name of the index FedoraGenericSearch should use