/**
   * Default Constructor.
   *
   * @param webServiceTemplate the webservice template
   */
  public FileStoreServiceClient(WebServiceTemplate webServiceTemplate) {
    try {
      this.baseURI = new URI(webServiceTemplate.getDefaultUri());
    } catch (URISyntaxException e) {
      throw new Error("Bad hardcoded URI", e);
    }

    this.webServiceTemplate = webServiceTemplate;
  }
 public String getEndpointUri() {
   if (endpointMappingKey != null) {
     // only for consumers, use lookup key as endpoint uri/key
     return encode(endpointMappingKey.getLookupKey());
   } else if (webServiceTemplate != null) {
     return webServiceTemplate.getDefaultUri();
   }
   return null;
 }
  /**
   * @param filestoreURLString the externally reachable URL of the WebDAV filestore, e.g.
   *     "http://localhost:9000/filestore"
   */
  public FileStoreServiceClient(URI filestoreURLString) throws SOAPException {

    WebServiceTemplate webServiceTemplate = createWebServiceTemplate(filestoreURLString);

    try {
      this.baseURI = new URI(webServiceTemplate.getDefaultUri());
    } catch (URISyntaxException e) {
      throw new Error("Bad hardcoded URI", e);
    }

    this.webServiceTemplate = webServiceTemplate;
  }