Ignore:
Timestamp:
2012-09-12T19:37:39+12:00 (12 years ago)
Author:
ak19
Message:
  1. Fixed the democlient to work with the new GS3 again: lots of small things had got broken (such as image display, since the metadata being stored was different). 2. Updating the jar files and democlient distribution zip files with the latest working version of this.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/dlservices/GS3ServicesAPIA.java

    r22298 r26180  
    5757    static Logger LOG = Logger.getLogger(GS3ServicesAPIA.class);
    5858   
     59    /** Storing the baseURL, worked out from wsdlURL */
     60    protected String baseURL;
     61
    5962    /** Storing language settings for requests and responses*/
    6063    protected String language;
     
    8285        // this case, it is set to "" (which Greenstone takes as English).
    8386        this.language = "";
     87
     88    // work out the baseURL from the wsdlURL, which is just the domain prefix
     89    // (e.g. http://localhost:8383)
     90    String url = wsdlURLName;
     91    int index = url.indexOf("://") + "://".length();
     92    index = url.indexOf('/', index);
     93    url = url.substring(0, index); // everything upto the first / separator
     94    this.baseURL = url;
     95   
    8496    }
    8597
     
    164176     * do not contain relative paths, or otherwise deal with the resolution of
    165177     * relative urls themselves, then return "" from here. */
    166     public String getAssocFileBaseURL() { return ""; }
     178    public String getAssocFileBaseURL() {
     179        return baseURL; // return ""; // for old GS3
     180    }
    167181   
    168182    /** Part of the GS3 Java-Client's DigitalLibraryServicesAPIA interface
Note: See TracChangeset for help on using the changeset viewer.