2 * MuscleWSServiceLocator.java
4 * This file was auto-generated from WSDL
5 * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
9 * Jalview - A Sequence Alignment Editor and Viewer
10 * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
28 public class MuscleWSServiceLocator extends org.apache.axis.client.Service
29 implements ext.vamsas.MuscleWSService {
30 // Use to get a proxy class for MuscleWS
31 private java.lang.String MuscleWS_address = "http://anaplog.compbio.dundee.ac.uk:8080/axis/services/MuscleWS";
33 // The WSDD service name defaults to the port name.
34 private java.lang.String MuscleWSWSDDServiceName = "MuscleWS";
35 private java.util.HashSet ports = null;
37 public MuscleWSServiceLocator() {
40 public MuscleWSServiceLocator(org.apache.axis.EngineConfiguration config) {
44 public java.lang.String getMuscleWSAddress() {
45 return MuscleWS_address;
48 public java.lang.String getMuscleWSWSDDServiceName() {
49 return MuscleWSWSDDServiceName;
52 public void setMuscleWSWSDDServiceName(java.lang.String name) {
53 MuscleWSWSDDServiceName = name;
56 public ext.vamsas.MuscleWS getMuscleWS()
57 throws javax.xml.rpc.ServiceException {
58 java.net.URL endpoint;
61 endpoint = new java.net.URL(MuscleWS_address);
62 } catch (java.net.MalformedURLException e) {
63 throw new javax.xml.rpc.ServiceException(e);
66 return getMuscleWS(endpoint);
69 public ext.vamsas.MuscleWS getMuscleWS(java.net.URL portAddress)
70 throws javax.xml.rpc.ServiceException {
72 ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(portAddress,
74 _stub.setPortName(getMuscleWSWSDDServiceName());
77 } catch (org.apache.axis.AxisFault e) {
82 public void setMuscleWSEndpointAddress(java.lang.String address) {
83 MuscleWS_address = address;
87 * For the given interface, get the stub implementation.
88 * If this service has no port for the given interface,
89 * then ServiceException is thrown.
91 public java.rmi.Remote getPort(Class serviceEndpointInterface)
92 throws javax.xml.rpc.ServiceException {
94 if (ext.vamsas.MuscleWS.class.isAssignableFrom(
95 serviceEndpointInterface)) {
96 ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(new java.net.URL(
97 MuscleWS_address), this);
98 _stub.setPortName(getMuscleWSWSDDServiceName());
102 } catch (java.lang.Throwable t) {
103 throw new javax.xml.rpc.ServiceException(t);
106 throw new javax.xml.rpc.ServiceException(
107 "There is no stub implementation for the interface: " +
108 ((serviceEndpointInterface == null) ? "null"
109 : serviceEndpointInterface.getName()));
113 * For the given interface, get the stub implementation.
114 * If this service has no port for the given interface,
115 * then ServiceException is thrown.
117 public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
118 Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
119 if (portName == null) {
120 return getPort(serviceEndpointInterface);
123 java.lang.String inputPortName = portName.getLocalPart();
125 if ("MuscleWS".equals(inputPortName)) {
126 return getMuscleWS();
128 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
129 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
135 public javax.xml.namespace.QName getServiceName() {
136 return new javax.xml.namespace.QName("vamsas", "MuscleWSService");
139 public java.util.Iterator getPorts() {
141 ports = new java.util.HashSet();
142 ports.add(new javax.xml.namespace.QName("vamsas", "MuscleWS"));
145 return ports.iterator();
149 * Set the endpoint address for the specified port name.
151 public void setEndpointAddress(java.lang.String portName,
152 java.lang.String address) throws javax.xml.rpc.ServiceException {
153 if ("MuscleWS".equals(portName)) {
154 setMuscleWSEndpointAddress(address);
155 } else { // Unknown Port Name
156 throw new javax.xml.rpc.ServiceException(
157 " Cannot set Endpoint Address for Unknown Port" + portName);
162 * Set the endpoint address for the specified port name.
164 public void setEndpointAddress(javax.xml.namespace.QName portName,
165 java.lang.String address) throws javax.xml.rpc.ServiceException {
166 setEndpointAddress(portName.getLocalPart(), address);