JAL-1503 update version in GPL header
[jalview.git] / src / ext / vamsas / SeqSearchServiceLocator.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
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.
10  *  
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.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package ext.vamsas;
20
21 public class SeqSearchServiceLocator extends org.apache.axis.client.Service
22         implements ext.vamsas.SeqSearchServiceService
23 {
24
25   public SeqSearchServiceLocator()
26   {
27   }
28
29   public SeqSearchServiceLocator(org.apache.axis.EngineConfiguration config)
30   {
31     super(config);
32   }
33
34   // Use to get a proxy class for ScanPSService
35   private java.lang.String ScanPSService_address = "http://localhost:8080/TestJWS/services/ScanPSService";
36
37   public java.lang.String getSeqSeachServiceAddress()
38   {
39     return ScanPSService_address;
40   }
41
42   // The WSDD service name defaults to the port name.
43   private java.lang.String ScanPSServiceWSDDServiceName = "ScanPSService";
44
45   public java.lang.String getScanPSServiceWSDDServiceName()
46   {
47     return ScanPSServiceWSDDServiceName;
48   }
49
50   public void setScanPSServiceWSDDServiceName(java.lang.String name)
51   {
52     ScanPSServiceWSDDServiceName = name;
53   }
54
55   public ext.vamsas.SeqSearchI getSeqSearchService()
56           throws javax.xml.rpc.ServiceException
57   {
58     java.net.URL endpoint;
59     try
60     {
61       endpoint = new java.net.URL(ScanPSService_address);
62     } catch (java.net.MalformedURLException e)
63     {
64       throw new javax.xml.rpc.ServiceException(e);
65     }
66     return getSeqSearchService(endpoint);
67   }
68
69   public ext.vamsas.SeqSearchI getSeqSearchService(java.net.URL portAddress)
70           throws javax.xml.rpc.ServiceException
71   {
72     try
73     {
74       ext.vamsas.SeqSearchServiceSoapBindingStub _stub = new ext.vamsas.SeqSearchServiceSoapBindingStub(
75               portAddress, this);
76       _stub.setPortName(getScanPSServiceWSDDServiceName());
77       return _stub;
78     } catch (org.apache.axis.AxisFault e)
79     {
80       return null;
81     }
82   }
83
84   public void setScanPSServiceEndpointAddress(java.lang.String address)
85   {
86     ScanPSService_address = address;
87   }
88
89   /**
90    * For the given interface, get the stub implementation. If this service has
91    * no port for the given interface, then ServiceException is thrown.
92    */
93   public java.rmi.Remote getPort(Class serviceEndpointInterface)
94           throws javax.xml.rpc.ServiceException
95   {
96     try
97     {
98       if (ext.vamsas.SeqSearchI.class
99               .isAssignableFrom(serviceEndpointInterface))
100       {
101         ext.vamsas.SeqSearchServiceSoapBindingStub _stub = new ext.vamsas.SeqSearchServiceSoapBindingStub(
102                 new java.net.URL(ScanPSService_address), this);
103         _stub.setPortName(getScanPSServiceWSDDServiceName());
104         return _stub;
105       }
106     } catch (java.lang.Throwable t)
107     {
108       throw new javax.xml.rpc.ServiceException(t);
109     }
110     throw new javax.xml.rpc.ServiceException(
111             "There is no stub implementation for the interface:  "
112                     + (serviceEndpointInterface == null ? "null"
113                             : serviceEndpointInterface.getName()));
114   }
115
116   /**
117    * For the given interface, get the stub implementation. If this service has
118    * no port for the given interface, then ServiceException is thrown.
119    */
120   public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
121           Class serviceEndpointInterface)
122           throws javax.xml.rpc.ServiceException
123   {
124     if (portName == null)
125     {
126       return getPort(serviceEndpointInterface);
127     }
128     java.lang.String inputPortName = portName.getLocalPart();
129     if ("ScanPSService".equals(inputPortName))
130     {
131       return getSeqSearchService();
132     }
133     else
134     {
135       java.rmi.Remote _stub = getPort(serviceEndpointInterface);
136       ((org.apache.axis.client.Stub) _stub).setPortName(portName);
137       return _stub;
138     }
139   }
140
141   public javax.xml.namespace.QName getServiceName()
142   {
143     return new javax.xml.namespace.QName("vamsas", "ScanPSServiceService");
144   }
145
146   private java.util.HashSet ports = null;
147
148   public java.util.Iterator getPorts()
149   {
150     if (ports == null)
151     {
152       ports = new java.util.HashSet();
153       ports.add(new javax.xml.namespace.QName("vamsas", "ScanPSService"));
154     }
155     return ports.iterator();
156   }
157
158   /**
159    * Set the endpoint address for the specified port name.
160    */
161   public void setEndpointAddress(java.lang.String portName,
162           java.lang.String address) throws javax.xml.rpc.ServiceException
163   {
164     if ("ScanPSService".equals(portName))
165     {
166       setScanPSServiceEndpointAddress(address);
167     }
168     else
169     { // Unknown Port Name
170       throw new javax.xml.rpc.ServiceException(
171               " Cannot set Endpoint Address for Unknown Port" + portName);
172     }
173   }
174
175   /**
176    * Set the endpoint address for the specified port name.
177    */
178   public void setEndpointAddress(javax.xml.namespace.QName portName,
179           java.lang.String address) throws javax.xml.rpc.ServiceException
180   {
181     setEndpointAddress(portName.getLocalPart(), address);
182   }
183
184 }