2 * JPredWSServiceLocator.java
4 * This file was auto-generated from WSDL
5 * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
9 * Jalview - A Sequence Alignment Editor and Viewer
10 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
28 public class JPredWSServiceLocator extends org.apache.axis.client.Service
\r
29 implements ext.vamsas.JPredWSService {
\r
30 // Use to get a proxy class for jpred
\r
31 private java.lang.String jpred_address = "http://anaplog.compbio.dundee.ac.uk:8080/axis/services/jpred";
\r
33 // The WSDD service name defaults to the port name.
\r
34 private java.lang.String jpredWSDDServiceName = "jpred";
\r
35 private java.util.HashSet ports = null;
\r
37 public JPredWSServiceLocator() {
\r
40 public JPredWSServiceLocator(org.apache.axis.EngineConfiguration config) {
\r
44 public java.lang.String getjpredAddress() {
\r
45 return jpred_address;
\r
48 public java.lang.String getjpredWSDDServiceName() {
\r
49 return jpredWSDDServiceName;
\r
52 public void setjpredWSDDServiceName(java.lang.String name) {
\r
53 jpredWSDDServiceName = name;
\r
56 public ext.vamsas.JPredWS getjpred() throws javax.xml.rpc.ServiceException {
\r
57 java.net.URL endpoint;
\r
60 endpoint = new java.net.URL(jpred_address);
\r
61 } catch (java.net.MalformedURLException e) {
\r
62 throw new javax.xml.rpc.ServiceException(e);
\r
65 return getjpred(endpoint);
\r
68 public ext.vamsas.JPredWS getjpred(java.net.URL portAddress)
\r
69 throws javax.xml.rpc.ServiceException {
\r
71 ext.vamsas.JpredSoapBindingStub _stub = new ext.vamsas.JpredSoapBindingStub(portAddress,
\r
73 _stub.setPortName(getjpredWSDDServiceName());
\r
76 } catch (org.apache.axis.AxisFault e) {
\r
81 public void setjpredEndpointAddress(java.lang.String address) {
\r
82 jpred_address = address;
\r
86 * For the given interface, get the stub implementation.
87 * If this service has no port for the given interface,
88 * then ServiceException is thrown.
90 public java.rmi.Remote getPort(Class serviceEndpointInterface)
\r
91 throws javax.xml.rpc.ServiceException {
\r
93 if (ext.vamsas.JPredWS.class.isAssignableFrom(
\r
94 serviceEndpointInterface)) {
\r
95 ext.vamsas.JpredSoapBindingStub _stub = new ext.vamsas.JpredSoapBindingStub(new java.net.URL(
\r
96 jpred_address), this);
\r
97 _stub.setPortName(getjpredWSDDServiceName());
\r
101 } catch (java.lang.Throwable t) {
\r
102 throw new javax.xml.rpc.ServiceException(t);
\r
105 throw new javax.xml.rpc.ServiceException(
\r
106 "There is no stub implementation for the interface: " +
\r
107 ((serviceEndpointInterface == null) ? "null"
\r
108 : serviceEndpointInterface.getName()));
\r
112 * For the given interface, get the stub implementation.
113 * If this service has no port for the given interface,
114 * then ServiceException is thrown.
116 public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
\r
117 Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
\r
118 if (portName == null) {
\r
119 return getPort(serviceEndpointInterface);
\r
122 java.lang.String inputPortName = portName.getLocalPart();
\r
124 if ("jpred".equals(inputPortName)) {
\r
127 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
\r
128 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
\r
134 public javax.xml.namespace.QName getServiceName() {
\r
135 return new javax.xml.namespace.QName("vamsas", "JPredWSService");
\r
138 public java.util.Iterator getPorts() {
\r
139 if (ports == null) {
\r
140 ports = new java.util.HashSet();
\r
141 ports.add(new javax.xml.namespace.QName("vamsas", "jpred"));
\r
144 return ports.iterator();
\r
148 * Set the endpoint address for the specified port name.
150 public void setEndpointAddress(java.lang.String portName,
\r
151 java.lang.String address) throws javax.xml.rpc.ServiceException {
\r
152 if ("jpred".equals(portName)) {
\r
153 setjpredEndpointAddress(address);
\r
154 } else { // Unknown Port Name
\r
155 throw new javax.xml.rpc.ServiceException(
\r
156 " Cannot set Endpoint Address for Unknown Port" + portName);
\r
161 * Set the endpoint address for the specified port name.
163 public void setEndpointAddress(javax.xml.namespace.QName portName,
\r
164 java.lang.String address) throws javax.xml.rpc.ServiceException {
\r
165 setEndpointAddress(portName.getLocalPart(), address);
\r