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;
23 import jalview.util.MessageManager;
25 public class WSWUBlastServiceLocator extends org.apache.axis.client.Service
26 implements uk.ac.ebi.www.WSWUBlastService
29 // Use to get a proxy class for WSWUBlast
30 private final java.lang.String WSWUBlast_address = "http://www.ebi.ac.uk/~alabarga/cgi-bin/webservices/WSWUBlast";
32 public java.lang.String getWSWUBlastAddress()
34 return WSWUBlast_address;
37 // The WSDD service name defaults to the port name.
38 private java.lang.String WSWUBlastWSDDServiceName = "WSWUBlast";
40 public java.lang.String getWSWUBlastWSDDServiceName()
42 return WSWUBlastWSDDServiceName;
45 public void setWSWUBlastWSDDServiceName(java.lang.String name)
47 WSWUBlastWSDDServiceName = name;
50 public uk.ac.ebi.www.WSWUBlast getWSWUBlast()
51 throws javax.xml.rpc.ServiceException
53 java.net.URL endpoint;
56 endpoint = new java.net.URL(WSWUBlast_address);
57 } catch (java.net.MalformedURLException e)
59 return null; // unlikely as URL was validated in WSDL2Java
61 return getWSWUBlast(endpoint);
64 public uk.ac.ebi.www.WSWUBlast getWSWUBlast(java.net.URL portAddress)
65 throws javax.xml.rpc.ServiceException
69 uk.ac.ebi.www.WSWUBlastSoapBindingStub _stub = new uk.ac.ebi.www.WSWUBlastSoapBindingStub(
71 _stub.setPortName(getWSWUBlastWSDDServiceName());
73 } catch (org.apache.axis.AxisFault e)
80 * For the given interface, get the stub implementation. If this service has
81 * no port for the given interface, then ServiceException is thrown.
83 public java.rmi.Remote getPort(Class serviceEndpointInterface)
84 throws javax.xml.rpc.ServiceException
88 if (uk.ac.ebi.www.WSWUBlast.class
89 .isAssignableFrom(serviceEndpointInterface))
91 uk.ac.ebi.www.WSWUBlastSoapBindingStub _stub = new uk.ac.ebi.www.WSWUBlastSoapBindingStub(
92 new java.net.URL(WSWUBlast_address), this);
93 _stub.setPortName(getWSWUBlastWSDDServiceName());
96 } catch (java.lang.Throwable t)
98 throw new javax.xml.rpc.ServiceException(t);
100 throw new javax.xml.rpc.ServiceException(MessageManager.formatMessage(
101 "exception.no_stub_implementation_for_interface",
102 new String[] { (serviceEndpointInterface == null ? "null"
103 : serviceEndpointInterface.getName()) }));
107 * For the given interface, get the stub implementation. If this service has
108 * no port for the given interface, then ServiceException is thrown.
110 public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
111 Class serviceEndpointInterface)
112 throws javax.xml.rpc.ServiceException
114 java.rmi.Remote _stub = getPort(serviceEndpointInterface);
115 ((org.apache.axis.client.Stub) _stub).setPortName(portName);
119 public javax.xml.namespace.QName getServiceName()
121 return new javax.xml.namespace.QName("http://www.ebi.ac.uk/WSWUBlast",
125 private java.util.HashSet ports = null;
127 public java.util.Iterator getPorts()
131 ports = new java.util.HashSet();
132 ports.add(new javax.xml.namespace.QName("WSWUBlast"));
134 return ports.iterator();