JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / uk / ac / ebi / www / WSWUBlastServiceLocator.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
3  * Copyright (C) 2015 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
10  * of the License, or (at your option) any later version.
11  *  
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.
16  * 
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.
20  */
21 package uk.ac.ebi.www;
22
23 import jalview.util.MessageManager;
24
25 public class WSWUBlastServiceLocator extends org.apache.axis.client.Service
26         implements uk.ac.ebi.www.WSWUBlastService
27 {
28
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";
31
32   public java.lang.String getWSWUBlastAddress()
33   {
34     return WSWUBlast_address;
35   }
36
37   // The WSDD service name defaults to the port name.
38   private java.lang.String WSWUBlastWSDDServiceName = "WSWUBlast";
39
40   public java.lang.String getWSWUBlastWSDDServiceName()
41   {
42     return WSWUBlastWSDDServiceName;
43   }
44
45   public void setWSWUBlastWSDDServiceName(java.lang.String name)
46   {
47     WSWUBlastWSDDServiceName = name;
48   }
49
50   public uk.ac.ebi.www.WSWUBlast getWSWUBlast()
51           throws javax.xml.rpc.ServiceException
52   {
53     java.net.URL endpoint;
54     try
55     {
56       endpoint = new java.net.URL(WSWUBlast_address);
57     } catch (java.net.MalformedURLException e)
58     {
59       return null; // unlikely as URL was validated in WSDL2Java
60     }
61     return getWSWUBlast(endpoint);
62   }
63
64   public uk.ac.ebi.www.WSWUBlast getWSWUBlast(java.net.URL portAddress)
65           throws javax.xml.rpc.ServiceException
66   {
67     try
68     {
69       uk.ac.ebi.www.WSWUBlastSoapBindingStub _stub = new uk.ac.ebi.www.WSWUBlastSoapBindingStub(
70               portAddress, this);
71       _stub.setPortName(getWSWUBlastWSDDServiceName());
72       return _stub;
73     } catch (org.apache.axis.AxisFault e)
74     {
75       return null;
76     }
77   }
78
79   /**
80    * For the given interface, get the stub implementation. If this service has
81    * no port for the given interface, then ServiceException is thrown.
82    */
83   public java.rmi.Remote getPort(Class serviceEndpointInterface)
84           throws javax.xml.rpc.ServiceException
85   {
86     try
87     {
88       if (uk.ac.ebi.www.WSWUBlast.class
89               .isAssignableFrom(serviceEndpointInterface))
90       {
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());
94         return _stub;
95       }
96     } catch (java.lang.Throwable t)
97     {
98       throw new javax.xml.rpc.ServiceException(t);
99     }
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()) }));
104   }
105
106   /**
107    * For the given interface, get the stub implementation. If this service has
108    * no port for the given interface, then ServiceException is thrown.
109    */
110   public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
111           Class serviceEndpointInterface)
112           throws javax.xml.rpc.ServiceException
113   {
114     java.rmi.Remote _stub = getPort(serviceEndpointInterface);
115     ((org.apache.axis.client.Stub) _stub).setPortName(portName);
116     return _stub;
117   }
118
119   public javax.xml.namespace.QName getServiceName()
120   {
121     return new javax.xml.namespace.QName("http://www.ebi.ac.uk/WSWUBlast",
122             "WSWUBlastService");
123   }
124
125   private java.util.HashSet ports = null;
126
127   public java.util.Iterator getPorts()
128   {
129     if (ports == null)
130     {
131       ports = new java.util.HashSet();
132       ports.add(new javax.xml.namespace.QName("WSWUBlast"));
133     }
134     return ports.iterator();
135   }
136
137 }