2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
3 * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
21 public class IRegistryServiceLocator extends org.apache.axis.client.Service
22 implements ext.vamsas.IRegistryService
25 public IRegistryServiceLocator()
29 public IRegistryServiceLocator(org.apache.axis.EngineConfiguration config)
34 // Use to get a proxy class for RegistryService
35 private java.lang.String RegistryService_address = "http://webservices.compbio.dundee.ac.uk:8080/jalTestWS/services/RegistryService";
37 public java.lang.String getRegistryServiceAddress()
39 return RegistryService_address;
42 // The WSDD service name defaults to the port name.
43 private java.lang.String RegistryServiceWSDDServiceName = "RegistryService";
45 public java.lang.String getRegistryServiceWSDDServiceName()
47 return RegistryServiceWSDDServiceName;
50 public void setRegistryServiceWSDDServiceName(java.lang.String name)
52 RegistryServiceWSDDServiceName = name;
55 public ext.vamsas.IRegistry getRegistryService()
56 throws javax.xml.rpc.ServiceException
58 java.net.URL endpoint;
61 endpoint = new java.net.URL(RegistryService_address);
62 } catch (java.net.MalformedURLException e)
64 throw new javax.xml.rpc.ServiceException(e);
66 return getRegistryService(endpoint);
69 public ext.vamsas.IRegistry getRegistryService(java.net.URL portAddress)
70 throws javax.xml.rpc.ServiceException
74 ext.vamsas.RegistryServiceSoapBindingStub _stub = new ext.vamsas.RegistryServiceSoapBindingStub(
76 _stub.setPortName(getRegistryServiceWSDDServiceName());
78 } catch (org.apache.axis.AxisFault e)
84 public void setRegistryServiceEndpointAddress(java.lang.String address)
86 RegistryService_address = address;
90 * For the given interface, get the stub implementation. If this service has
91 * no port for the given interface, then ServiceException is thrown.
93 public java.rmi.Remote getPort(Class serviceEndpointInterface)
94 throws javax.xml.rpc.ServiceException
98 if (ext.vamsas.IRegistry.class
99 .isAssignableFrom(serviceEndpointInterface))
101 ext.vamsas.RegistryServiceSoapBindingStub _stub = new ext.vamsas.RegistryServiceSoapBindingStub(
102 new java.net.URL(RegistryService_address), this);
103 _stub.setPortName(getRegistryServiceWSDDServiceName());
106 } catch (java.lang.Throwable t)
108 throw new javax.xml.rpc.ServiceException(t);
110 throw new javax.xml.rpc.ServiceException(
111 "There is no stub implementation for the interface: "
112 + (serviceEndpointInterface == null ? "null"
113 : serviceEndpointInterface.getName()));
117 * For the given interface, get the stub implementation. If this service has
118 * no port for the given interface, then ServiceException is thrown.
120 public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
121 Class serviceEndpointInterface)
122 throws javax.xml.rpc.ServiceException
124 if (portName == null)
126 return getPort(serviceEndpointInterface);
128 java.lang.String inputPortName = portName.getLocalPart();
129 if ("RegistryService".equals(inputPortName))
131 return getRegistryService();
135 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
136 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
141 public javax.xml.namespace.QName getServiceName()
143 return new javax.xml.namespace.QName("vamsas", "IRegistryService");
146 private java.util.HashSet ports = null;
148 public java.util.Iterator getPorts()
152 ports = new java.util.HashSet();
153 ports.add(new javax.xml.namespace.QName("vamsas", "RegistryService"));
155 return ports.iterator();
159 * Set the endpoint address for the specified port name.
161 public void setEndpointAddress(java.lang.String portName,
162 java.lang.String address) throws javax.xml.rpc.ServiceException
164 if ("RegistryService".equals(portName))
166 setRegistryServiceEndpointAddress(address);
169 { // Unknown Port Name
170 throw new javax.xml.rpc.ServiceException(
171 " Cannot set Endpoint Address for Unknown Port" + portName);
176 * Set the endpoint address for the specified port name.
178 public void setEndpointAddress(javax.xml.namespace.QName portName,
179 java.lang.String address) throws javax.xml.rpc.ServiceException
181 setEndpointAddress(portName.getLocalPart(), address);