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 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 public class MuscleWSServiceLocator extends org.apache.axis.client.Service
22 implements ext.vamsas.MuscleWSService
24 // Use to get a proxy class for MuscleWS
25 private java.lang.String MuscleWS_address = "http://anaplog.compbio.dundee.ac.uk:8080/axis/services/MuscleWS";
27 // The WSDD service name defaults to the port name.
28 private java.lang.String MuscleWSWSDDServiceName = "MuscleWS";
30 private java.util.HashSet ports = null;
32 public MuscleWSServiceLocator()
36 public MuscleWSServiceLocator(org.apache.axis.EngineConfiguration config)
41 public java.lang.String getMuscleWSAddress()
43 return MuscleWS_address;
46 public java.lang.String getMuscleWSWSDDServiceName()
48 return MuscleWSWSDDServiceName;
51 public void setMuscleWSWSDDServiceName(java.lang.String name)
53 MuscleWSWSDDServiceName = name;
56 public ext.vamsas.MuscleWS getMuscleWS()
57 throws javax.xml.rpc.ServiceException
59 java.net.URL endpoint;
63 endpoint = new java.net.URL(MuscleWS_address);
64 } catch (java.net.MalformedURLException e)
66 throw new javax.xml.rpc.ServiceException(e);
69 return getMuscleWS(endpoint);
72 public ext.vamsas.MuscleWS getMuscleWS(java.net.URL portAddress)
73 throws javax.xml.rpc.ServiceException
77 ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(
79 _stub.setPortName(getMuscleWSWSDDServiceName());
82 } catch (org.apache.axis.AxisFault e)
88 public void setMuscleWSEndpointAddress(java.lang.String address)
90 MuscleWS_address = address;
94 * For the given interface, get the stub implementation. If this service has
95 * no port for the given interface, then ServiceException is thrown.
97 public java.rmi.Remote getPort(Class serviceEndpointInterface)
98 throws javax.xml.rpc.ServiceException
102 if (ext.vamsas.MuscleWS.class
103 .isAssignableFrom(serviceEndpointInterface))
105 ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(
106 new java.net.URL(MuscleWS_address), this);
107 _stub.setPortName(getMuscleWSWSDDServiceName());
111 } catch (java.lang.Throwable t)
113 throw new javax.xml.rpc.ServiceException(t);
116 throw new javax.xml.rpc.ServiceException(
117 "There is no stub implementation for the interface: "
118 + ((serviceEndpointInterface == null) ? "null"
119 : serviceEndpointInterface.getName()));
123 * For the given interface, get the stub implementation. If this service has
124 * no port for the given interface, then ServiceException is thrown.
126 public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
127 Class serviceEndpointInterface)
128 throws javax.xml.rpc.ServiceException
130 if (portName == null)
132 return getPort(serviceEndpointInterface);
135 java.lang.String inputPortName = portName.getLocalPart();
137 if ("MuscleWS".equals(inputPortName))
139 return getMuscleWS();
143 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
144 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
150 public javax.xml.namespace.QName getServiceName()
152 return new javax.xml.namespace.QName("vamsas", "MuscleWSService");
155 public java.util.Iterator getPorts()
159 ports = new java.util.HashSet();
160 ports.add(new javax.xml.namespace.QName("vamsas", "MuscleWS"));
163 return ports.iterator();
167 * Set the endpoint address for the specified port name.
169 public void setEndpointAddress(java.lang.String portName,
170 java.lang.String address) throws javax.xml.rpc.ServiceException
172 if ("MuscleWS".equals(portName))
174 setMuscleWSEndpointAddress(address);
177 { // Unknown Port Name
178 throw new javax.xml.rpc.ServiceException(
179 " Cannot set Endpoint Address for Unknown Port" + portName);
184 * Set the endpoint address for the specified port name.
186 public void setEndpointAddress(javax.xml.namespace.QName portName,
187 java.lang.String address) throws javax.xml.rpc.ServiceException
189 setEndpointAddress(portName.getLocalPart(), address);