2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 public class MuscleWSServiceLocator extends org.apache.axis.client.Service
24 implements ext.vamsas.MuscleWSService
26 // Use to get a proxy class for MuscleWS
27 private java.lang.String MuscleWS_address = "http://anaplog.compbio.dundee.ac.uk:8080/axis/services/MuscleWS";
29 // The WSDD service name defaults to the port name.
30 private java.lang.String MuscleWSWSDDServiceName = "MuscleWS";
32 private java.util.HashSet ports = null;
34 public MuscleWSServiceLocator()
38 public MuscleWSServiceLocator(org.apache.axis.EngineConfiguration config)
43 public java.lang.String getMuscleWSAddress()
45 return MuscleWS_address;
48 public java.lang.String getMuscleWSWSDDServiceName()
50 return MuscleWSWSDDServiceName;
53 public void setMuscleWSWSDDServiceName(java.lang.String name)
55 MuscleWSWSDDServiceName = name;
58 public ext.vamsas.MuscleWS getMuscleWS()
59 throws javax.xml.rpc.ServiceException
61 java.net.URL endpoint;
65 endpoint = new java.net.URL(MuscleWS_address);
66 } catch (java.net.MalformedURLException e)
68 throw new javax.xml.rpc.ServiceException(e);
71 return getMuscleWS(endpoint);
74 public ext.vamsas.MuscleWS getMuscleWS(java.net.URL portAddress)
75 throws javax.xml.rpc.ServiceException
79 ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(
81 _stub.setPortName(getMuscleWSWSDDServiceName());
84 } catch (org.apache.axis.AxisFault e)
90 public void setMuscleWSEndpointAddress(java.lang.String address)
92 MuscleWS_address = address;
96 * For the given interface, get the stub implementation. If this service has
97 * no port for the given interface, then ServiceException is thrown.
99 public java.rmi.Remote getPort(Class serviceEndpointInterface)
100 throws javax.xml.rpc.ServiceException
104 if (ext.vamsas.MuscleWS.class
105 .isAssignableFrom(serviceEndpointInterface))
107 ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(
108 new java.net.URL(MuscleWS_address), this);
109 _stub.setPortName(getMuscleWSWSDDServiceName());
113 } catch (java.lang.Throwable t)
115 throw new javax.xml.rpc.ServiceException(t);
118 throw new javax.xml.rpc.ServiceException(
119 "There is no stub implementation for the interface: "
120 + ((serviceEndpointInterface == null) ? "null"
121 : serviceEndpointInterface.getName()));
125 * For the given interface, get the stub implementation. If this service has
126 * no port for the given interface, then ServiceException is thrown.
128 public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
129 Class serviceEndpointInterface)
130 throws javax.xml.rpc.ServiceException
132 if (portName == null)
134 return getPort(serviceEndpointInterface);
137 java.lang.String inputPortName = portName.getLocalPart();
139 if ("MuscleWS".equals(inputPortName))
141 return getMuscleWS();
145 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
146 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
152 public javax.xml.namespace.QName getServiceName()
154 return new javax.xml.namespace.QName("vamsas", "MuscleWSService");
157 public java.util.Iterator getPorts()
161 ports = new java.util.HashSet();
162 ports.add(new javax.xml.namespace.QName("vamsas", "MuscleWS"));
165 return ports.iterator();
169 * Set the endpoint address for the specified port name.
171 public void setEndpointAddress(java.lang.String portName,
172 java.lang.String address) throws javax.xml.rpc.ServiceException
174 if ("MuscleWS".equals(portName))
176 setMuscleWSEndpointAddress(address);
179 { // Unknown Port Name
180 throw new javax.xml.rpc.ServiceException(
181 " Cannot set Endpoint Address for Unknown Port" + portName);
186 * Set the endpoint address for the specified port name.
188 public void setEndpointAddress(javax.xml.namespace.QName portName,
189 java.lang.String address) throws javax.xml.rpc.ServiceException
191 setEndpointAddress(portName.getLocalPart(), address);