GPL license added
[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) 2005 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
27 package ext.vamsas;
28
29 public class MuscleWSServiceLocator extends org.apache.axis.client.Service implements ext.vamsas.MuscleWSService {
30
31     public MuscleWSServiceLocator() {
32     }
33
34
35     public MuscleWSServiceLocator(org.apache.axis.EngineConfiguration config) {
36         super(config);
37     }
38
39     // Use to get a proxy class for MuscleWS
40     private java.lang.String MuscleWS_address = "http://anaplog.compbio.dundee.ac.uk:8080/axis/services/MuscleWS";
41
42     public java.lang.String getMuscleWSAddress() {
43         return MuscleWS_address;
44     }
45
46     // The WSDD service name defaults to the port name.
47     private java.lang.String MuscleWSWSDDServiceName = "MuscleWS";
48
49     public java.lang.String getMuscleWSWSDDServiceName() {
50         return MuscleWSWSDDServiceName;
51     }
52
53     public void setMuscleWSWSDDServiceName(java.lang.String name) {
54         MuscleWSWSDDServiceName = name;
55     }
56
57     public ext.vamsas.MuscleWS getMuscleWS() throws javax.xml.rpc.ServiceException {
58        java.net.URL endpoint;
59         try {
60             endpoint = new java.net.URL(MuscleWS_address);
61         }
62         catch (java.net.MalformedURLException e) {
63             throw new javax.xml.rpc.ServiceException(e);
64         }
65         return getMuscleWS(endpoint);
66     }
67
68     public ext.vamsas.MuscleWS getMuscleWS(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
69         try {
70             ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(portAddress, this);
71             _stub.setPortName(getMuscleWSWSDDServiceName());
72             return _stub;
73         }
74         catch (org.apache.axis.AxisFault e) {
75             return null;
76         }
77     }
78
79     public void setMuscleWSEndpointAddress(java.lang.String address) {
80         MuscleWS_address = address;
81     }
82
83     /**
84      * For the given interface, get the stub implementation.
85      * If this service has no port for the given interface,
86      * then ServiceException is thrown.
87      */
88     public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
89         try {
90             if (ext.vamsas.MuscleWS.class.isAssignableFrom(serviceEndpointInterface)) {
91                 ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(new java.net.URL(MuscleWS_address), this);
92                 _stub.setPortName(getMuscleWSWSDDServiceName());
93                 return _stub;
94             }
95         }
96         catch (java.lang.Throwable t) {
97             throw new javax.xml.rpc.ServiceException(t);
98         }
99         throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
100     }
101
102     /**
103      * For the given interface, get the stub implementation.
104      * If this service has no port for the given interface,
105      * then ServiceException is thrown.
106      */
107     public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
108         if (portName == null) {
109             return getPort(serviceEndpointInterface);
110         }
111         java.lang.String inputPortName = portName.getLocalPart();
112         if ("MuscleWS".equals(inputPortName)) {
113             return getMuscleWS();
114         }
115         else  {
116             java.rmi.Remote _stub = getPort(serviceEndpointInterface);
117             ((org.apache.axis.client.Stub) _stub).setPortName(portName);
118             return _stub;
119         }
120     }
121
122     public javax.xml.namespace.QName getServiceName() {
123         return new javax.xml.namespace.QName("vamsas", "MuscleWSService");
124     }
125
126     private java.util.HashSet ports = null;
127
128     public java.util.Iterator getPorts() {
129         if (ports == null) {
130             ports = new java.util.HashSet();
131             ports.add(new javax.xml.namespace.QName("vamsas", "MuscleWS"));
132         }
133         return ports.iterator();
134     }
135
136     /**
137     * Set the endpoint address for the specified port name.
138     */
139     public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
140         if ("MuscleWS".equals(portName)) {
141             setMuscleWSEndpointAddress(address);
142         }
143         else { // Unknown Port Name
144             throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
145         }
146     }
147
148     /**
149     * Set the endpoint address for the specified port name.
150     */
151     public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
152         setEndpointAddress(portName.getLocalPart(), address);
153     }
154
155 }