Formatting
[jalview.git] / src / ext / vamsas / JpredServiceLocator.java
1 /**
2  * JpredServiceLocator.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
6  */
7
8 package ext.vamsas;
9
10 public class JpredServiceLocator
11     extends org.apache.axis.client.Service implements ext.vamsas.JpredService
12 {
13
14   public JpredServiceLocator()
15   {
16   }
17
18   public JpredServiceLocator(org.apache.axis.EngineConfiguration config)
19   {
20     super(config);
21   }
22
23   // Use to get a proxy class for jpred
24   private java.lang.String jpred_address =
25       "http://www.compbio.dundee.ac.uk/JalviewWS/services/jpred";
26
27   public java.lang.String getjpredAddress()
28   {
29     return jpred_address;
30   }
31
32   // The WSDD service name defaults to the port name.
33   private java.lang.String jpredWSDDServiceName = "jpred";
34
35   public java.lang.String getjpredWSDDServiceName()
36   {
37     return jpredWSDDServiceName;
38   }
39
40   public void setjpredWSDDServiceName(java.lang.String name)
41   {
42     jpredWSDDServiceName = name;
43   }
44
45   public ext.vamsas.Jpred getjpred()
46       throws javax.xml.rpc.ServiceException
47   {
48     java.net.URL endpoint;
49     try
50     {
51       endpoint = new java.net.URL(jpred_address);
52     }
53     catch (java.net.MalformedURLException e)
54     {
55       throw new javax.xml.rpc.ServiceException(e);
56     }
57     return getjpred(endpoint);
58   }
59
60   public ext.vamsas.Jpred getjpred(java.net.URL portAddress)
61       throws javax.xml.rpc.ServiceException
62   {
63     try
64     {
65       ext.vamsas.JpredSoapBindingStub _stub = new ext.vamsas.
66           JpredSoapBindingStub(portAddress, this);
67       _stub.setPortName(getjpredWSDDServiceName());
68       return _stub;
69     }
70     catch (org.apache.axis.AxisFault e)
71     {
72       return null;
73     }
74   }
75
76   public void setjpredEndpointAddress(java.lang.String address)
77   {
78     jpred_address = address;
79   }
80
81   /**
82    * For the given interface, get the stub implementation.
83    * If this service has no port for the given interface,
84    * then ServiceException is thrown.
85    */
86   public java.rmi.Remote getPort(Class serviceEndpointInterface)
87       throws javax.xml.rpc.ServiceException
88   {
89     try
90     {
91       if (ext.vamsas.Jpred.class.isAssignableFrom(serviceEndpointInterface))
92       {
93         ext.vamsas.JpredSoapBindingStub _stub = new ext.vamsas.
94             JpredSoapBindingStub(new java.net.URL(jpred_address), this);
95         _stub.setPortName(getjpredWSDDServiceName());
96         return _stub;
97       }
98     }
99     catch (java.lang.Throwable t)
100     {
101       throw new javax.xml.rpc.ServiceException(t);
102     }
103     throw new javax.xml.rpc.ServiceException(
104         "There is no stub implementation for the interface:  " +
105         (serviceEndpointInterface == null ? "null" :
106          serviceEndpointInterface.getName()));
107   }
108
109   /**
110    * For the given interface, get the stub implementation.
111    * If this service has no port for the given interface,
112    * then ServiceException is thrown.
113    */
114   public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
115                                  Class serviceEndpointInterface)
116       throws javax.xml.rpc.ServiceException
117   {
118     if (portName == null)
119     {
120       return getPort(serviceEndpointInterface);
121     }
122     java.lang.String inputPortName = portName.getLocalPart();
123     if ("jpred".equals(inputPortName))
124     {
125       return getjpred();
126     }
127     else
128     {
129       java.rmi.Remote _stub = getPort(serviceEndpointInterface);
130       ( (org.apache.axis.client.Stub) _stub).setPortName(portName);
131       return _stub;
132     }
133   }
134
135   public javax.xml.namespace.QName getServiceName()
136   {
137     return new javax.xml.namespace.QName("vamsas", "jpredService");
138   }
139
140   private java.util.HashSet ports = null;
141
142   public java.util.Iterator getPorts()
143   {
144     if (ports == null)
145     {
146       ports = new java.util.HashSet();
147       ports.add(new javax.xml.namespace.QName("vamsas", "jpred"));
148     }
149     return ports.iterator();
150   }
151
152   /**
153    * Set the endpoint address for the specified port name.
154    */
155   public void setEndpointAddress(java.lang.String portName,
156                                  java.lang.String address)
157       throws javax.xml.rpc.ServiceException
158   {
159     if ("jpred".equals(portName))
160     {
161       setjpredEndpointAddress(address);
162     }
163     else
164     { // Unknown Port Name
165       throw new javax.xml.rpc.ServiceException(
166           " Cannot set Endpoint Address for Unknown Port" + portName);
167     }
168   }
169
170   /**
171    * Set the endpoint address for the specified port name.
172    */
173   public void setEndpointAddress(javax.xml.namespace.QName portName,
174                                  java.lang.String address)
175       throws javax.xml.rpc.ServiceException
176   {
177     setEndpointAddress(portName.getLocalPart(), address);
178   }
179
180 }