Formatting
[jalview.git] / src / ext / vamsas / IRegistryServiceLocator.java
1 /**
2  * IRegistryServiceLocator.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 IRegistryServiceLocator
11     extends org.apache.axis.client.Service implements ext.vamsas.
12     IRegistryService
13 {
14
15   public IRegistryServiceLocator()
16   {
17   }
18
19   public IRegistryServiceLocator(org.apache.axis.EngineConfiguration config)
20   {
21     super(config);
22   }
23
24   // Use to get a proxy class for RegistryService
25   private java.lang.String RegistryService_address = "http://webservices.compbio.dundee.ac.uk:8080/jalTestWS/services/RegistryService";
26
27   public java.lang.String getRegistryServiceAddress()
28   {
29     return RegistryService_address;
30   }
31
32   // The WSDD service name defaults to the port name.
33   private java.lang.String RegistryServiceWSDDServiceName = "RegistryService";
34
35   public java.lang.String getRegistryServiceWSDDServiceName()
36   {
37     return RegistryServiceWSDDServiceName;
38   }
39
40   public void setRegistryServiceWSDDServiceName(java.lang.String name)
41   {
42     RegistryServiceWSDDServiceName = name;
43   }
44
45   public ext.vamsas.IRegistry getRegistryService()
46       throws javax.xml.rpc.ServiceException
47   {
48     java.net.URL endpoint;
49     try
50     {
51       endpoint = new java.net.URL(RegistryService_address);
52     }
53     catch (java.net.MalformedURLException e)
54     {
55       throw new javax.xml.rpc.ServiceException(e);
56     }
57     return getRegistryService(endpoint);
58   }
59
60   public ext.vamsas.IRegistry getRegistryService(java.net.URL portAddress)
61       throws javax.xml.rpc.ServiceException
62   {
63     try
64     {
65       ext.vamsas.RegistryServiceSoapBindingStub _stub = new ext.vamsas.
66           RegistryServiceSoapBindingStub(portAddress, this);
67       _stub.setPortName(getRegistryServiceWSDDServiceName());
68       return _stub;
69     }
70     catch (org.apache.axis.AxisFault e)
71     {
72       return null;
73     }
74   }
75
76   public void setRegistryServiceEndpointAddress(java.lang.String address)
77   {
78     RegistryService_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.IRegistry.class.isAssignableFrom(serviceEndpointInterface))
92       {
93         ext.vamsas.RegistryServiceSoapBindingStub _stub = new ext.vamsas.
94             RegistryServiceSoapBindingStub(new java.net.URL(
95             RegistryService_address), this);
96         _stub.setPortName(getRegistryServiceWSDDServiceName());
97         return _stub;
98       }
99     }
100     catch (java.lang.Throwable t)
101     {
102       throw new javax.xml.rpc.ServiceException(t);
103     }
104     throw new javax.xml.rpc.ServiceException(
105         "There is no stub implementation for the interface:  " +
106         (serviceEndpointInterface == null ? "null" :
107          serviceEndpointInterface.getName()));
108   }
109
110   /**
111    * For the given interface, get the stub implementation.
112    * If this service has no port for the given interface,
113    * then ServiceException is thrown.
114    */
115   public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
116                                  Class serviceEndpointInterface)
117       throws javax.xml.rpc.ServiceException
118   {
119     if (portName == null)
120     {
121       return getPort(serviceEndpointInterface);
122     }
123     java.lang.String inputPortName = portName.getLocalPart();
124     if ("RegistryService".equals(inputPortName))
125     {
126       return getRegistryService();
127     }
128     else
129     {
130       java.rmi.Remote _stub = getPort(serviceEndpointInterface);
131       ( (org.apache.axis.client.Stub) _stub).setPortName(portName);
132       return _stub;
133     }
134   }
135
136   public javax.xml.namespace.QName getServiceName()
137   {
138     return new javax.xml.namespace.QName("vamsas", "IRegistryService");
139   }
140
141   private java.util.HashSet ports = null;
142
143   public java.util.Iterator getPorts()
144   {
145     if (ports == null)
146     {
147       ports = new java.util.HashSet();
148       ports.add(new javax.xml.namespace.QName("vamsas", "RegistryService"));
149     }
150     return ports.iterator();
151   }
152
153   /**
154    * Set the endpoint address for the specified port name.
155    */
156   public void setEndpointAddress(java.lang.String portName,
157                                  java.lang.String address)
158       throws javax.xml.rpc.ServiceException
159   {
160     if ("RegistryService".equals(portName))
161     {
162       setRegistryServiceEndpointAddress(address);
163     }
164     else
165     { // Unknown Port Name
166       throw new javax.xml.rpc.ServiceException(
167           " Cannot set Endpoint Address for Unknown Port" + portName);
168     }
169   }
170
171   /**
172    * Set the endpoint address for the specified port name.
173    */
174   public void setEndpointAddress(javax.xml.namespace.QName portName,
175                                  java.lang.String address)
176       throws javax.xml.rpc.ServiceException
177   {
178     setEndpointAddress(portName.getLocalPart(), address);
179   }
180
181 }