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