2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
20 public class IRegistryServiceLocator extends org.apache.axis.client.Service
21 implements ext.vamsas.IRegistryService
24 public IRegistryServiceLocator()
28 public IRegistryServiceLocator(org.apache.axis.EngineConfiguration config)
33 // Use to get a proxy class for RegistryService
34 private java.lang.String RegistryService_address = "http://webservices.compbio.dundee.ac.uk:8080/jalTestWS/services/RegistryService";
36 public java.lang.String getRegistryServiceAddress()
38 return RegistryService_address;
41 // The WSDD service name defaults to the port name.
42 private java.lang.String RegistryServiceWSDDServiceName = "RegistryService";
44 public java.lang.String getRegistryServiceWSDDServiceName()
46 return RegistryServiceWSDDServiceName;
49 public void setRegistryServiceWSDDServiceName(java.lang.String name)
51 RegistryServiceWSDDServiceName = name;
54 public ext.vamsas.IRegistry getRegistryService()
55 throws javax.xml.rpc.ServiceException
57 java.net.URL endpoint;
60 endpoint = new java.net.URL(RegistryService_address);
61 } catch (java.net.MalformedURLException e)
63 throw new javax.xml.rpc.ServiceException(e);
65 return getRegistryService(endpoint);
68 public ext.vamsas.IRegistry getRegistryService(java.net.URL portAddress)
69 throws javax.xml.rpc.ServiceException
73 ext.vamsas.RegistryServiceSoapBindingStub _stub = new ext.vamsas.RegistryServiceSoapBindingStub(
75 _stub.setPortName(getRegistryServiceWSDDServiceName());
77 } catch (org.apache.axis.AxisFault e)
83 public void setRegistryServiceEndpointAddress(java.lang.String address)
85 RegistryService_address = address;
89 * For the given interface, get the stub implementation. If this service has
90 * no port for the given interface, then ServiceException is thrown.
92 public java.rmi.Remote getPort(Class serviceEndpointInterface)
93 throws javax.xml.rpc.ServiceException
97 if (ext.vamsas.IRegistry.class
98 .isAssignableFrom(serviceEndpointInterface))
100 ext.vamsas.RegistryServiceSoapBindingStub _stub = new ext.vamsas.RegistryServiceSoapBindingStub(
101 new java.net.URL(RegistryService_address), this);
102 _stub.setPortName(getRegistryServiceWSDDServiceName());
105 } catch (java.lang.Throwable t)
107 throw new javax.xml.rpc.ServiceException(t);
109 throw new javax.xml.rpc.ServiceException(
110 "There is no stub implementation for the interface: "
111 + (serviceEndpointInterface == null ? "null"
112 : serviceEndpointInterface.getName()));
116 * For the given interface, get the stub implementation. If this service has
117 * no port for the given interface, then ServiceException is thrown.
119 public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
120 Class serviceEndpointInterface)
121 throws javax.xml.rpc.ServiceException
123 if (portName == null)
125 return getPort(serviceEndpointInterface);
127 java.lang.String inputPortName = portName.getLocalPart();
128 if ("RegistryService".equals(inputPortName))
130 return getRegistryService();
134 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
135 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
140 public javax.xml.namespace.QName getServiceName()
142 return new javax.xml.namespace.QName("vamsas", "IRegistryService");
145 private java.util.HashSet ports = null;
147 public java.util.Iterator getPorts()
151 ports = new java.util.HashSet();
152 ports.add(new javax.xml.namespace.QName("vamsas", "RegistryService"));
154 return ports.iterator();
158 * Set the endpoint address for the specified port name.
160 public void setEndpointAddress(java.lang.String portName,
161 java.lang.String address) throws javax.xml.rpc.ServiceException
163 if ("RegistryService".equals(portName))
165 setRegistryServiceEndpointAddress(address);
168 { // Unknown Port Name
169 throw new javax.xml.rpc.ServiceException(
170 " Cannot set Endpoint Address for Unknown Port" + portName);
175 * Set the endpoint address for the specified port name.
177 public void setEndpointAddress(javax.xml.namespace.QName portName,
178 java.lang.String address) throws javax.xml.rpc.ServiceException
180 setEndpointAddress(portName.getLocalPart(), address);