updated to jalview 2.1 and begun ArchiveClient/VamsasClient/VamsasStore updates.
[jalview.git] / src / ext / vamsas / MuscleWSServiceLocator.java
1 /**
2  * MuscleWSServiceLocator.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
6  */
7
8 /*
9 * Jalview - A Sequence Alignment Editor and Viewer
10 * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
11 *
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.
16 *
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.
21 *
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
25 */
26 package ext.vamsas;
27
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";
32
33     // The WSDD service name defaults to the port name.
34     private java.lang.String MuscleWSWSDDServiceName = "MuscleWS";
35     private java.util.HashSet ports = null;
36
37     public MuscleWSServiceLocator() {
38     }
39
40     public MuscleWSServiceLocator(org.apache.axis.EngineConfiguration config) {
41         super(config);
42     }
43
44     public java.lang.String getMuscleWSAddress() {
45         return MuscleWS_address;
46     }
47
48     public java.lang.String getMuscleWSWSDDServiceName() {
49         return MuscleWSWSDDServiceName;
50     }
51
52     public void setMuscleWSWSDDServiceName(java.lang.String name) {
53         MuscleWSWSDDServiceName = name;
54     }
55
56     public ext.vamsas.MuscleWS getMuscleWS()
57         throws javax.xml.rpc.ServiceException {
58         java.net.URL endpoint;
59
60         try {
61             endpoint = new java.net.URL(MuscleWS_address);
62         } catch (java.net.MalformedURLException e) {
63             throw new javax.xml.rpc.ServiceException(e);
64         }
65
66         return getMuscleWS(endpoint);
67     }
68
69     public ext.vamsas.MuscleWS getMuscleWS(java.net.URL portAddress)
70         throws javax.xml.rpc.ServiceException {
71         try {
72             ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(portAddress,
73                     this);
74             _stub.setPortName(getMuscleWSWSDDServiceName());
75
76             return _stub;
77         } catch (org.apache.axis.AxisFault e) {
78             return null;
79         }
80     }
81
82     public void setMuscleWSEndpointAddress(java.lang.String address) {
83         MuscleWS_address = address;
84     }
85
86     /**
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.
90  */
91     public java.rmi.Remote getPort(Class serviceEndpointInterface)
92         throws javax.xml.rpc.ServiceException {
93         try {
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());
99
100                 return _stub;
101             }
102         } catch (java.lang.Throwable t) {
103             throw new javax.xml.rpc.ServiceException(t);
104         }
105
106         throw new javax.xml.rpc.ServiceException(
107             "There is no stub implementation for the interface:  " +
108             ((serviceEndpointInterface == null) ? "null"
109                                                 : serviceEndpointInterface.getName()));
110     }
111
112     /**
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.
116  */
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);
121         }
122
123         java.lang.String inputPortName = portName.getLocalPart();
124
125         if ("MuscleWS".equals(inputPortName)) {
126             return getMuscleWS();
127         } else {
128             java.rmi.Remote _stub = getPort(serviceEndpointInterface);
129             ((org.apache.axis.client.Stub) _stub).setPortName(portName);
130
131             return _stub;
132         }
133     }
134
135     public javax.xml.namespace.QName getServiceName() {
136         return new javax.xml.namespace.QName("vamsas", "MuscleWSService");
137     }
138
139     public java.util.Iterator getPorts() {
140         if (ports == null) {
141             ports = new java.util.HashSet();
142             ports.add(new javax.xml.namespace.QName("vamsas", "MuscleWS"));
143         }
144
145         return ports.iterator();
146     }
147
148     /**
149 * Set the endpoint address for the specified port name.
150 */
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);
158         }
159     }
160
161     /**
162 * Set the endpoint address for the specified port name.
163 */
164     public void setEndpointAddress(javax.xml.namespace.QName portName,
165         java.lang.String address) throws javax.xml.rpc.ServiceException {
166         setEndpointAddress(portName.getLocalPart(), address);
167     }
168 }