2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ 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.
21 package uk.ac.ebi.www.picr.AccessionMappingService;
23 import jalview.util.MessageManager;
25 public class AccessionMapperServiceLocator
26 extends org.apache.axis.client.Service implements
27 uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperService
30 public AccessionMapperServiceLocator()
34 public AccessionMapperServiceLocator(
35 org.apache.axis.EngineConfiguration config)
40 // Use to get a proxy class for AccessionMapperPort
41 private java.lang.String AccessionMapperPort_address = "http://www.ebi.ac.uk:80/Tools/picr/service";
43 public java.lang.String getAccessionMapperPortAddress()
45 return AccessionMapperPort_address;
48 // The WSDD service name defaults to the port name.
49 private java.lang.String AccessionMapperPortWSDDServiceName = "AccessionMapperPort";
51 public java.lang.String getAccessionMapperPortWSDDServiceName()
53 return AccessionMapperPortWSDDServiceName;
56 public void setAccessionMapperPortWSDDServiceName(java.lang.String name)
58 AccessionMapperPortWSDDServiceName = name;
61 public uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperInterface getAccessionMapperPort()
62 throws javax.xml.rpc.ServiceException
64 java.net.URL endpoint;
67 endpoint = new java.net.URL(AccessionMapperPort_address);
68 } catch (java.net.MalformedURLException e)
70 throw new javax.xml.rpc.ServiceException(e);
72 return getAccessionMapperPort(endpoint);
75 public uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperInterface getAccessionMapperPort(
76 java.net.URL portAddress) throws javax.xml.rpc.ServiceException
80 uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperBindingStub _stub = new uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperBindingStub(
82 _stub.setPortName(getAccessionMapperPortWSDDServiceName());
84 } catch (org.apache.axis.AxisFault e)
90 public void setAccessionMapperPortEndpointAddress(
91 java.lang.String address)
93 AccessionMapperPort_address = address;
97 * For the given interface, get the stub implementation. If this service has
98 * no port for the given interface, then ServiceException is thrown.
100 public java.rmi.Remote getPort(Class serviceEndpointInterface)
101 throws javax.xml.rpc.ServiceException
105 if (uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperInterface.class
106 .isAssignableFrom(serviceEndpointInterface))
108 uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperBindingStub _stub = new uk.ac.ebi.www.picr.AccessionMappingService.AccessionMapperBindingStub(
109 new java.net.URL(AccessionMapperPort_address), this);
110 _stub.setPortName(getAccessionMapperPortWSDDServiceName());
113 } catch (java.lang.Throwable t)
115 throw new javax.xml.rpc.ServiceException(t);
117 throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage(
118 "exception.no_stub_implementation_for_interface", new String[]
119 { (serviceEndpointInterface == null ? "null"
120 : serviceEndpointInterface.getName()) }));
124 * For the given interface, get the stub implementation. If this service has
125 * no port for the given interface, then ServiceException is thrown.
127 public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
128 Class serviceEndpointInterface)
129 throws javax.xml.rpc.ServiceException
131 if (portName == null)
133 return getPort(serviceEndpointInterface);
135 java.lang.String inputPortName = portName.getLocalPart();
136 if ("AccessionMapperPort".equals(inputPortName))
138 return getAccessionMapperPort();
142 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
143 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
148 public javax.xml.namespace.QName getServiceName()
150 return new javax.xml.namespace.QName(
151 "http://www.ebi.ac.uk/picr/AccessionMappingService",
152 "AccessionMapperService");
155 private java.util.HashSet ports = null;
157 public java.util.Iterator getPorts()
161 ports = new java.util.HashSet();
162 ports.add(new javax.xml.namespace.QName(
163 "http://www.ebi.ac.uk/picr/AccessionMappingService",
164 "AccessionMapperPort"));
166 return ports.iterator();
170 * Set the endpoint address for the specified port name.
172 public void setEndpointAddress(java.lang.String portName,
173 java.lang.String address) throws javax.xml.rpc.ServiceException
175 if ("AccessionMapperPort".equals(portName))
177 setAccessionMapperPortEndpointAddress(address);
180 { // Unknown Port Name
181 throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage(
182 "exception.cannot_set_endpoint_address_unknown_port",
189 * Set the endpoint address for the specified port name.
191 public void setEndpointAddress(javax.xml.namespace.QName portName,
192 java.lang.String address) throws javax.xml.rpc.ServiceException
194 setEndpointAddress(portName.getLocalPart(), address);