header updated
[jalview.git] / src / ext / vamsas / MuscleWSServiceLocator.java
1 /**\r
2  * MuscleWSServiceLocator.java\r
3  *\r
4  * This file was auto-generated from WSDL\r
5  * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.\r
6  */\r
7 \r
8 /*\r
9 * Jalview - A Sequence Alignment Editor and Viewer\r
10 * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
11 *\r
12 * This program is free software; you can redistribute it and/or\r
13 * modify it under the terms of the GNU General Public License\r
14 * as published by the Free Software Foundation; either version 2\r
15 * of the License, or (at your option) any later version.\r
16 *\r
17 * This program is distributed in the hope that it will be useful,\r
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
20 * GNU General Public License for more details.\r
21 *\r
22 * You should have received a copy of the GNU General Public License\r
23 * along with this program; if not, write to the Free Software\r
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
25 */\r
26 package ext.vamsas;\r
27 \r
28 public class MuscleWSServiceLocator extends org.apache.axis.client.Service\r
29     implements ext.vamsas.MuscleWSService {\r
30     // Use to get a proxy class for MuscleWS\r
31     private java.lang.String MuscleWS_address = "http://anaplog.compbio.dundee.ac.uk:8080/axis/services/MuscleWS";\r
32 \r
33     // The WSDD service name defaults to the port name.\r
34     private java.lang.String MuscleWSWSDDServiceName = "MuscleWS";\r
35     private java.util.HashSet ports = null;\r
36 \r
37     public MuscleWSServiceLocator() {\r
38     }\r
39 \r
40     public MuscleWSServiceLocator(org.apache.axis.EngineConfiguration config) {\r
41         super(config);\r
42     }\r
43 \r
44     public java.lang.String getMuscleWSAddress() {\r
45         return MuscleWS_address;\r
46     }\r
47 \r
48     public java.lang.String getMuscleWSWSDDServiceName() {\r
49         return MuscleWSWSDDServiceName;\r
50     }\r
51 \r
52     public void setMuscleWSWSDDServiceName(java.lang.String name) {\r
53         MuscleWSWSDDServiceName = name;\r
54     }\r
55 \r
56     public ext.vamsas.MuscleWS getMuscleWS()\r
57         throws javax.xml.rpc.ServiceException {\r
58         java.net.URL endpoint;\r
59 \r
60         try {\r
61             endpoint = new java.net.URL(MuscleWS_address);\r
62         } catch (java.net.MalformedURLException e) {\r
63             throw new javax.xml.rpc.ServiceException(e);\r
64         }\r
65 \r
66         return getMuscleWS(endpoint);\r
67     }\r
68 \r
69     public ext.vamsas.MuscleWS getMuscleWS(java.net.URL portAddress)\r
70         throws javax.xml.rpc.ServiceException {\r
71         try {\r
72             ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(portAddress,\r
73                     this);\r
74             _stub.setPortName(getMuscleWSWSDDServiceName());\r
75 \r
76             return _stub;\r
77         } catch (org.apache.axis.AxisFault e) {\r
78             return null;\r
79         }\r
80     }\r
81 \r
82     public void setMuscleWSEndpointAddress(java.lang.String address) {\r
83         MuscleWS_address = address;\r
84     }\r
85 \r
86     /**\r
87  * For the given interface, get the stub implementation.\r
88  * If this service has no port for the given interface,\r
89  * then ServiceException is thrown.\r
90  */\r
91     public java.rmi.Remote getPort(Class serviceEndpointInterface)\r
92         throws javax.xml.rpc.ServiceException {\r
93         try {\r
94             if (ext.vamsas.MuscleWS.class.isAssignableFrom(\r
95                         serviceEndpointInterface)) {\r
96                 ext.vamsas.MuscleWSSoapBindingStub _stub = new ext.vamsas.MuscleWSSoapBindingStub(new java.net.URL(\r
97                             MuscleWS_address), this);\r
98                 _stub.setPortName(getMuscleWSWSDDServiceName());\r
99 \r
100                 return _stub;\r
101             }\r
102         } catch (java.lang.Throwable t) {\r
103             throw new javax.xml.rpc.ServiceException(t);\r
104         }\r
105 \r
106         throw new javax.xml.rpc.ServiceException(\r
107             "There is no stub implementation for the interface:  " +\r
108             ((serviceEndpointInterface == null) ? "null"\r
109                                                 : serviceEndpointInterface.getName()));\r
110     }\r
111 \r
112     /**\r
113  * For the given interface, get the stub implementation.\r
114  * If this service has no port for the given interface,\r
115  * then ServiceException is thrown.\r
116  */\r
117     public java.rmi.Remote getPort(javax.xml.namespace.QName portName,\r
118         Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r
119         if (portName == null) {\r
120             return getPort(serviceEndpointInterface);\r
121         }\r
122 \r
123         java.lang.String inputPortName = portName.getLocalPart();\r
124 \r
125         if ("MuscleWS".equals(inputPortName)) {\r
126             return getMuscleWS();\r
127         } else {\r
128             java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r
129             ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r
130 \r
131             return _stub;\r
132         }\r
133     }\r
134 \r
135     public javax.xml.namespace.QName getServiceName() {\r
136         return new javax.xml.namespace.QName("vamsas", "MuscleWSService");\r
137     }\r
138 \r
139     public java.util.Iterator getPorts() {\r
140         if (ports == null) {\r
141             ports = new java.util.HashSet();\r
142             ports.add(new javax.xml.namespace.QName("vamsas", "MuscleWS"));\r
143         }\r
144 \r
145         return ports.iterator();\r
146     }\r
147 \r
148     /**\r
149 * Set the endpoint address for the specified port name.\r
150 */\r
151     public void setEndpointAddress(java.lang.String portName,\r
152         java.lang.String address) throws javax.xml.rpc.ServiceException {\r
153         if ("MuscleWS".equals(portName)) {\r
154             setMuscleWSEndpointAddress(address);\r
155         } else { // Unknown Port Name\r
156             throw new javax.xml.rpc.ServiceException(\r
157                 " Cannot set Endpoint Address for Unknown Port" + portName);\r
158         }\r
159     }\r
160 \r
161     /**\r
162 * Set the endpoint address for the specified port name.\r
163 */\r
164     public void setEndpointAddress(javax.xml.namespace.QName portName,\r
165         java.lang.String address) throws javax.xml.rpc.ServiceException {\r
166         setEndpointAddress(portName.getLocalPart(), address);\r
167     }\r
168 }\r