2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 public class IRegistryServiceLocator extends org.apache.axis.client.Service
24 implements ext.vamsas.IRegistryService
27 public IRegistryServiceLocator()
31 public IRegistryServiceLocator(org.apache.axis.EngineConfiguration config)
36 // Use to get a proxy class for RegistryService
37 private java.lang.String RegistryService_address = "http://webservices.compbio.dundee.ac.uk:8080/jalTestWS/services/RegistryService";
39 public java.lang.String getRegistryServiceAddress()
41 return RegistryService_address;
44 // The WSDD service name defaults to the port name.
45 private java.lang.String RegistryServiceWSDDServiceName = "RegistryService";
47 public java.lang.String getRegistryServiceWSDDServiceName()
49 return RegistryServiceWSDDServiceName;
52 public void setRegistryServiceWSDDServiceName(java.lang.String name)
54 RegistryServiceWSDDServiceName = name;
57 public ext.vamsas.IRegistry getRegistryService()
58 throws javax.xml.rpc.ServiceException
60 java.net.URL endpoint;
63 endpoint = new java.net.URL(RegistryService_address);
64 } catch (java.net.MalformedURLException e)
66 throw new javax.xml.rpc.ServiceException(e);
68 return getRegistryService(endpoint);
71 public ext.vamsas.IRegistry getRegistryService(java.net.URL portAddress)
72 throws javax.xml.rpc.ServiceException
76 ext.vamsas.RegistryServiceSoapBindingStub _stub = new ext.vamsas.RegistryServiceSoapBindingStub(
78 _stub.setPortName(getRegistryServiceWSDDServiceName());
80 } catch (org.apache.axis.AxisFault e)
86 public void setRegistryServiceEndpointAddress(java.lang.String address)
88 RegistryService_address = address;
92 * For the given interface, get the stub implementation. If this service has
93 * no port for the given interface, then ServiceException is thrown.
95 public java.rmi.Remote getPort(Class serviceEndpointInterface)
96 throws javax.xml.rpc.ServiceException
100 if (ext.vamsas.IRegistry.class
101 .isAssignableFrom(serviceEndpointInterface))
103 ext.vamsas.RegistryServiceSoapBindingStub _stub = new ext.vamsas.RegistryServiceSoapBindingStub(
104 new java.net.URL(RegistryService_address), this);
105 _stub.setPortName(getRegistryServiceWSDDServiceName());
108 } catch (java.lang.Throwable t)
110 throw new javax.xml.rpc.ServiceException(t);
112 throw new javax.xml.rpc.ServiceException(
113 "There is no stub implementation for the interface: "
114 + (serviceEndpointInterface == null ? "null"
115 : serviceEndpointInterface.getName()));
119 * For the given interface, get the stub implementation. If this service has
120 * no port for the given interface, then ServiceException is thrown.
122 public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
123 Class serviceEndpointInterface)
124 throws javax.xml.rpc.ServiceException
126 if (portName == null)
128 return getPort(serviceEndpointInterface);
130 java.lang.String inputPortName = portName.getLocalPart();
131 if ("RegistryService".equals(inputPortName))
133 return getRegistryService();
137 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
138 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
143 public javax.xml.namespace.QName getServiceName()
145 return new javax.xml.namespace.QName("vamsas", "IRegistryService");
148 private java.util.HashSet ports = null;
150 public java.util.Iterator getPorts()
154 ports = new java.util.HashSet();
155 ports.add(new javax.xml.namespace.QName("vamsas", "RegistryService"));
157 return ports.iterator();
161 * Set the endpoint address for the specified port name.
163 public void setEndpointAddress(java.lang.String portName,
164 java.lang.String address) throws javax.xml.rpc.ServiceException
166 if ("RegistryService".equals(portName))
168 setRegistryServiceEndpointAddress(address);
171 { // Unknown Port Name
172 throw new javax.xml.rpc.ServiceException(
173 " Cannot set Endpoint Address for Unknown Port" + portName);
178 * Set the endpoint address for the specified port name.
180 public void setEndpointAddress(javax.xml.namespace.QName portName,
181 java.lang.String address) throws javax.xml.rpc.ServiceException
183 setEndpointAddress(portName.getLocalPart(), address);