X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fext%2Fvamsas%2FMuscleWSServiceLocator.java;h=0f08435ac73a11efe3bcea510e47420016e7fe23;hb=42ed1251f862e7b06be27ab205406afdc6a6f317;hp=c822d9247550e6236135e22c97a3ca9500c99e88;hpb=49685e6426d5ac136dce4907196751680c667670;p=jalview.git diff --git a/src/ext/vamsas/MuscleWSServiceLocator.java b/src/ext/vamsas/MuscleWSServiceLocator.java index c822d92..0f08435 100755 --- a/src/ext/vamsas/MuscleWSServiceLocator.java +++ b/src/ext/vamsas/MuscleWSServiceLocator.java @@ -36,16 +36,15 @@ */ 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); }