fix to ensure multiple accessions can be fetched for sources like the PDB (see jalvie...
[jalview.git] / src / ext / vamsas / MuscleWSServiceLocator.java
index c822d92..0f08435 100755 (executable)
  */
 package ext.vamsas;
 
-public class MuscleWSServiceLocator
-    extends org.apache.axis.client.Service implements ext.vamsas.
-    MuscleWSService
+public class MuscleWSServiceLocator extends org.apache.axis.client.Service
+        implements ext.vamsas.MuscleWSService
 {
   // Use to get a proxy class for MuscleWS
-  private java.lang.String MuscleWS_address =
-      "http://anaplog.compbio.dundee.ac.uk:8080/axis/services/MuscleWS";
+  private java.lang.String MuscleWS_address = "http://anaplog.compbio.dundee.ac.uk:8080/axis/services/MuscleWS";
 
   // The WSDD service name defaults to the port name.
   private java.lang.String MuscleWSWSDDServiceName = "MuscleWS";
+
   private java.util.HashSet ports = null;
 
   public MuscleWSServiceLocator()
@@ -73,15 +72,14 @@ public class MuscleWSServiceLocator
   }
 
   public ext.vamsas.MuscleWS getMuscleWS()
-      throws javax.xml.rpc.ServiceException
+          throws javax.xml.rpc.ServiceException
   {
     java.net.URL endpoint;
 
     try
     {
       endpoint = new java.net.URL(MuscleWS_address);
-    }
-    catch (java.net.MalformedURLException e)
+    } catch (java.net.MalformedURLException e)
     {
       throw new javax.xml.rpc.ServiceException(e);
     }
@@ -90,18 +88,16 @@ public class MuscleWSServiceLocator
   }
 
   public ext.vamsas.MuscleWS getMuscleWS(java.net.URL portAddress)
-      throws javax.xml.rpc.ServiceException
+          throws javax.xml.rpc.ServiceException
   {
     try
     {
-      ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.
-          MuscleWSSoapBindingStub(portAddress,
-                                  this);
+      ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(
+              portAddress, this);
       _stub.setPortName(getMuscleWSWSDDServiceName());
 
       return _stub;
-    }
-    catch (org.apache.axis.AxisFault e)
+    } catch (org.apache.axis.AxisFault e)
     {
       return null;
     }
@@ -113,45 +109,41 @@ public class MuscleWSServiceLocator
   }
 
   /**
-   * For the given interface, get the stub implementation.
-   * If this service has no port for the given interface,
-   * then ServiceException is thrown.
+   * For the given interface, get the stub implementation. If this service has
+   * no port for the given interface, then ServiceException is thrown.
    */
   public java.rmi.Remote getPort(Class serviceEndpointInterface)
-      throws javax.xml.rpc.ServiceException
+          throws javax.xml.rpc.ServiceException
   {
     try
     {
-      if (ext.vamsas.MuscleWS.class.isAssignableFrom(
-          serviceEndpointInterface))
+      if (ext.vamsas.MuscleWS.class
+              .isAssignableFrom(serviceEndpointInterface))
       {
-        ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.
-            MuscleWSSoapBindingStub(new java.net.URL(
-                MuscleWS_address), this);
+        ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(
+                new java.net.URL(MuscleWS_address), this);
         _stub.setPortName(getMuscleWSWSDDServiceName());
 
         return _stub;
       }
-    }
-    catch (java.lang.Throwable t)
+    } catch (java.lang.Throwable t)
     {
       throw new javax.xml.rpc.ServiceException(t);
     }
 
     throw new javax.xml.rpc.ServiceException(
-        "There is no stub implementation for the interface:  " +
-        ( (serviceEndpointInterface == null) ? "null"
-         : serviceEndpointInterface.getName()));
+            "There is no stub implementation for the interface:  "
+                    + ((serviceEndpointInterface == null) ? "null"
+                            : serviceEndpointInterface.getName()));
   }
 
   /**
-   * For the given interface, get the stub implementation.
-   * If this service has no port for the given interface,
-   * then ServiceException is thrown.
+   * For the given interface, get the stub implementation. If this service has
+   * no port for the given interface, then ServiceException is thrown.
    */
   public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
-                                 Class serviceEndpointInterface)
-      throws javax.xml.rpc.ServiceException
+          Class serviceEndpointInterface)
+          throws javax.xml.rpc.ServiceException
   {
     if (portName == null)
     {
@@ -167,7 +159,7 @@ public class MuscleWSServiceLocator
     else
     {
       java.rmi.Remote _stub = getPort(serviceEndpointInterface);
-      ( (org.apache.axis.client.Stub) _stub).setPortName(portName);
+      ((org.apache.axis.client.Stub) _stub).setPortName(portName);
 
       return _stub;
     }
@@ -193,8 +185,7 @@ public class MuscleWSServiceLocator
    * Set the endpoint address for the specified port name.
    */
   public void setEndpointAddress(java.lang.String portName,
-                                 java.lang.String address)
-      throws javax.xml.rpc.ServiceException
+          java.lang.String address) throws javax.xml.rpc.ServiceException
   {
     if ("MuscleWS".equals(portName))
     {
@@ -203,7 +194,7 @@ public class MuscleWSServiceLocator
     else
     { // Unknown Port Name
       throw new javax.xml.rpc.ServiceException(
-          " Cannot set Endpoint Address for Unknown Port" + portName);
+              " Cannot set Endpoint Address for Unknown Port" + portName);
     }
   }
 
@@ -211,8 +202,7 @@ public class MuscleWSServiceLocator
    * Set the endpoint address for the specified port name.
    */
   public void setEndpointAddress(javax.xml.namespace.QName portName,
-                                 java.lang.String address)
-      throws javax.xml.rpc.ServiceException
+          java.lang.String address) throws javax.xml.rpc.ServiceException
   {
     setEndpointAddress(portName.getLocalPart(), address);
   }