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.
23 import jalview.util.MessageManager;
25 public class SeqSearchServiceLocator extends org.apache.axis.client.Service
26 implements ext.vamsas.SeqSearchServiceService
29 public SeqSearchServiceLocator()
33 public SeqSearchServiceLocator(org.apache.axis.EngineConfiguration config)
38 // Use to get a proxy class for ScanPSService
39 private java.lang.String ScanPSService_address = "http://localhost:8080/TestJWS/services/ScanPSService";
41 public java.lang.String getSeqSeachServiceAddress()
43 return ScanPSService_address;
46 // The WSDD service name defaults to the port name.
47 private java.lang.String ScanPSServiceWSDDServiceName = "ScanPSService";
49 public java.lang.String getScanPSServiceWSDDServiceName()
51 return ScanPSServiceWSDDServiceName;
54 public void setScanPSServiceWSDDServiceName(java.lang.String name)
56 ScanPSServiceWSDDServiceName = name;
59 public ext.vamsas.SeqSearchI getSeqSearchService()
60 throws javax.xml.rpc.ServiceException
62 java.net.URL endpoint;
65 endpoint = new java.net.URL(ScanPSService_address);
66 } catch (java.net.MalformedURLException e)
68 throw new javax.xml.rpc.ServiceException(e);
70 return getSeqSearchService(endpoint);
73 public ext.vamsas.SeqSearchI getSeqSearchService(java.net.URL portAddress)
74 throws javax.xml.rpc.ServiceException
78 ext.vamsas.SeqSearchServiceSoapBindingStub _stub = new ext.vamsas.SeqSearchServiceSoapBindingStub(
80 _stub.setPortName(getScanPSServiceWSDDServiceName());
82 } catch (org.apache.axis.AxisFault e)
88 public void setScanPSServiceEndpointAddress(java.lang.String address)
90 ScanPSService_address = address;
94 * For the given interface, get the stub implementation. If this service has
95 * no port for the given interface, then ServiceException is thrown.
97 public java.rmi.Remote getPort(Class serviceEndpointInterface)
98 throws javax.xml.rpc.ServiceException
102 if (ext.vamsas.SeqSearchI.class
103 .isAssignableFrom(serviceEndpointInterface))
105 ext.vamsas.SeqSearchServiceSoapBindingStub _stub = new ext.vamsas.SeqSearchServiceSoapBindingStub(
106 new java.net.URL(ScanPSService_address), this);
107 _stub.setPortName(getScanPSServiceWSDDServiceName());
110 } catch (java.lang.Throwable t)
112 throw new javax.xml.rpc.ServiceException(t);
114 throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage(
115 "exception.no_stub_implementation_for_interface",
116 new String[] { (serviceEndpointInterface == null ? "null"
117 : serviceEndpointInterface.getName()) }));
121 * For the given interface, get the stub implementation. If this service has
122 * no port for the given interface, then ServiceException is thrown.
124 public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
125 Class serviceEndpointInterface)
126 throws javax.xml.rpc.ServiceException
128 if (portName == null)
130 return getPort(serviceEndpointInterface);
132 java.lang.String inputPortName = portName.getLocalPart();
133 if ("ScanPSService".equals(inputPortName))
135 return getSeqSearchService();
139 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
140 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
145 public javax.xml.namespace.QName getServiceName()
147 return new javax.xml.namespace.QName("vamsas", "ScanPSServiceService");
150 private java.util.HashSet ports = null;
152 public java.util.Iterator getPorts()
156 ports = new java.util.HashSet();
157 ports.add(new javax.xml.namespace.QName("vamsas", "ScanPSService"));
159 return ports.iterator();
163 * Set the endpoint address for the specified port name.
165 public void setEndpointAddress(java.lang.String portName,
166 java.lang.String address) throws javax.xml.rpc.ServiceException
168 if ("ScanPSService".equals(portName))
170 setScanPSServiceEndpointAddress(address);
173 { // Unknown Port Name
174 throw new javax.xml.rpc.ServiceException(
175 MessageManager.formatMessage(
176 "exception.cannot_set_endpoint_address_unknown_port",
177 new String[] { portName }));
182 * Set the endpoint address for the specified port name.
184 public void setEndpointAddress(javax.xml.namespace.QName portName,
185 java.lang.String address) throws javax.xml.rpc.ServiceException
187 setEndpointAddress(portName.getLocalPart(), address);