1   /**
2    * WSRPServiceLocator.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
6    */
7   
8   package oasis.names.tc.wsrp.v1.wsdl;
9   
10  public class WSRPServiceLocator extends org.apache.axis.client.Service implements oasis.names.tc.wsrp.v1.wsdl.WSRPService {
11  
12      public WSRPServiceLocator() {
13      }
14  
15  
16      public WSRPServiceLocator(org.apache.axis.EngineConfiguration config) {
17          super(config);
18      }
19  
20      public WSRPServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
21          super(wsdlLoc, sName);
22      }
23  
24      // Use to get a proxy class for WSRPPortletManagementService
25      private java.lang.String WSRPPortletManagementService_address = "http://localhost:8080/WSRPService";
26  
27      public java.lang.String getWSRPPortletManagementServiceAddress() {
28          return WSRPPortletManagementService_address;
29      }
30  
31      // The WSDD service name defaults to the port name.
32      private java.lang.String WSRPPortletManagementServiceWSDDServiceName = "WSRPPortletManagementService";
33  
34      public java.lang.String getWSRPPortletManagementServiceWSDDServiceName() {
35          return WSRPPortletManagementServiceWSDDServiceName;
36      }
37  
38      public void setWSRPPortletManagementServiceWSDDServiceName(java.lang.String name) {
39          WSRPPortletManagementServiceWSDDServiceName = name;
40      }
41  
42      public oasis.names.tc.wsrp.v1.intf.WSRP_v1_PortletManagement_PortType getWSRPPortletManagementService() throws javax.xml.rpc.ServiceException {
43         java.net.URL endpoint;
44          try {
45              endpoint = new java.net.URL(WSRPPortletManagementService_address);
46          }
47          catch (java.net.MalformedURLException e) {
48              throw new javax.xml.rpc.ServiceException(e);
49          }
50          return getWSRPPortletManagementService(endpoint);
51      }
52  
53      public oasis.names.tc.wsrp.v1.intf.WSRP_v1_PortletManagement_PortType getWSRPPortletManagementService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
54          try {
55              oasis.names.tc.wsrp.v1.bind.WSRP_v1_PortletManagement_Binding_SOAPStub _stub = new oasis.names.tc.wsrp.v1.bind.WSRP_v1_PortletManagement_Binding_SOAPStub(portAddress, this);
56              _stub.setPortName(getWSRPPortletManagementServiceWSDDServiceName());
57              return _stub;
58          }
59          catch (org.apache.axis.AxisFault e) {
60              return null;
61          }
62      }
63  
64      public void setWSRPPortletManagementServiceEndpointAddress(java.lang.String address) {
65          WSRPPortletManagementService_address = address;
66      }
67  
68  
69      // Use to get a proxy class for WSRPRegistrationService
70      private java.lang.String WSRPRegistrationService_address = "http://localhost:8080/WSRPService";
71  
72      public java.lang.String getWSRPRegistrationServiceAddress() {
73          return WSRPRegistrationService_address;
74      }
75  
76      // The WSDD service name defaults to the port name.
77      private java.lang.String WSRPRegistrationServiceWSDDServiceName = "WSRPRegistrationService";
78  
79      public java.lang.String getWSRPRegistrationServiceWSDDServiceName() {
80          return WSRPRegistrationServiceWSDDServiceName;
81      }
82  
83      public void setWSRPRegistrationServiceWSDDServiceName(java.lang.String name) {
84          WSRPRegistrationServiceWSDDServiceName = name;
85      }
86  
87      public oasis.names.tc.wsrp.v1.intf.WSRP_v1_Registration_PortType getWSRPRegistrationService() throws javax.xml.rpc.ServiceException {
88         java.net.URL endpoint;
89          try {
90              endpoint = new java.net.URL(WSRPRegistrationService_address);
91          }
92          catch (java.net.MalformedURLException e) {
93              throw new javax.xml.rpc.ServiceException(e);
94          }
95          return getWSRPRegistrationService(endpoint);
96      }
97  
98      public oasis.names.tc.wsrp.v1.intf.WSRP_v1_Registration_PortType getWSRPRegistrationService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
99          try {
100             oasis.names.tc.wsrp.v1.bind.WSRP_v1_Registration_Binding_SOAPStub _stub = new oasis.names.tc.wsrp.v1.bind.WSRP_v1_Registration_Binding_SOAPStub(portAddress, this);
101             _stub.setPortName(getWSRPRegistrationServiceWSDDServiceName());
102             return _stub;
103         }
104         catch (org.apache.axis.AxisFault e) {
105             return null;
106         }
107     }
108 
109     public void setWSRPRegistrationServiceEndpointAddress(java.lang.String address) {
110         WSRPRegistrationService_address = address;
111     }
112 
113 
114     // Use to get a proxy class for WSRPBaseService
115     private java.lang.String WSRPBaseService_address = "http://localhost:8080/WSRPService";
116 
117     public java.lang.String getWSRPBaseServiceAddress() {
118         return WSRPBaseService_address;
119     }
120 
121     // The WSDD service name defaults to the port name.
122     private java.lang.String WSRPBaseServiceWSDDServiceName = "WSRPBaseService";
123 
124     public java.lang.String getWSRPBaseServiceWSDDServiceName() {
125         return WSRPBaseServiceWSDDServiceName;
126     }
127 
128     public void setWSRPBaseServiceWSDDServiceName(java.lang.String name) {
129         WSRPBaseServiceWSDDServiceName = name;
130     }
131 
132     public oasis.names.tc.wsrp.v1.intf.WSRP_v1_Markup_PortType getWSRPBaseService() throws javax.xml.rpc.ServiceException {
133        java.net.URL endpoint;
134         try {
135             endpoint = new java.net.URL(WSRPBaseService_address);
136         }
137         catch (java.net.MalformedURLException e) {
138             throw new javax.xml.rpc.ServiceException(e);
139         }
140         return getWSRPBaseService(endpoint);
141     }
142 
143     public oasis.names.tc.wsrp.v1.intf.WSRP_v1_Markup_PortType getWSRPBaseService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
144         try {
145             oasis.names.tc.wsrp.v1.bind.WSRP_v1_Markup_Binding_SOAPStub _stub = new oasis.names.tc.wsrp.v1.bind.WSRP_v1_Markup_Binding_SOAPStub(portAddress, this);
146             _stub.setPortName(getWSRPBaseServiceWSDDServiceName());
147             return _stub;
148         }
149         catch (org.apache.axis.AxisFault e) {
150             return null;
151         }
152     }
153 
154     public void setWSRPBaseServiceEndpointAddress(java.lang.String address) {
155         WSRPBaseService_address = address;
156     }
157 
158 
159     // Use to get a proxy class for WSRPServiceDescriptionService
160     private java.lang.String WSRPServiceDescriptionService_address = "http://localhost:8080/WSRPService";
161 
162     public java.lang.String getWSRPServiceDescriptionServiceAddress() {
163         return WSRPServiceDescriptionService_address;
164     }
165 
166     // The WSDD service name defaults to the port name.
167     private java.lang.String WSRPServiceDescriptionServiceWSDDServiceName = "WSRPServiceDescriptionService";
168 
169     public java.lang.String getWSRPServiceDescriptionServiceWSDDServiceName() {
170         return WSRPServiceDescriptionServiceWSDDServiceName;
171     }
172 
173     public void setWSRPServiceDescriptionServiceWSDDServiceName(java.lang.String name) {
174         WSRPServiceDescriptionServiceWSDDServiceName = name;
175     }
176 
177     public oasis.names.tc.wsrp.v1.intf.WSRP_v1_ServiceDescription_PortType getWSRPServiceDescriptionService() throws javax.xml.rpc.ServiceException {
178        java.net.URL endpoint;
179         try {
180             endpoint = new java.net.URL(WSRPServiceDescriptionService_address);
181         }
182         catch (java.net.MalformedURLException e) {
183             throw new javax.xml.rpc.ServiceException(e);
184         }
185         return getWSRPServiceDescriptionService(endpoint);
186     }
187 
188     public oasis.names.tc.wsrp.v1.intf.WSRP_v1_ServiceDescription_PortType getWSRPServiceDescriptionService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
189         try {
190             oasis.names.tc.wsrp.v1.bind.WSRP_v1_ServiceDescription_Binding_SOAPStub _stub = new oasis.names.tc.wsrp.v1.bind.WSRP_v1_ServiceDescription_Binding_SOAPStub(portAddress, this);
191             _stub.setPortName(getWSRPServiceDescriptionServiceWSDDServiceName());
192             return _stub;
193         }
194         catch (org.apache.axis.AxisFault e) {
195             return null;
196         }
197     }
198 
199     public void setWSRPServiceDescriptionServiceEndpointAddress(java.lang.String address) {
200         WSRPServiceDescriptionService_address = address;
201     }
202 
203     /**
204      * For the given interface, get the stub implementation.
205      * If this service has no port for the given interface,
206      * then ServiceException is thrown.
207      */
208     public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
209         try {
210             if (oasis.names.tc.wsrp.v1.intf.WSRP_v1_PortletManagement_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
211                 oasis.names.tc.wsrp.v1.bind.WSRP_v1_PortletManagement_Binding_SOAPStub _stub = new oasis.names.tc.wsrp.v1.bind.WSRP_v1_PortletManagement_Binding_SOAPStub(new java.net.URL(WSRPPortletManagementService_address), this);
212                 _stub.setPortName(getWSRPPortletManagementServiceWSDDServiceName());
213                 return _stub;
214             }
215             if (oasis.names.tc.wsrp.v1.intf.WSRP_v1_Registration_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
216                 oasis.names.tc.wsrp.v1.bind.WSRP_v1_Registration_Binding_SOAPStub _stub = new oasis.names.tc.wsrp.v1.bind.WSRP_v1_Registration_Binding_SOAPStub(new java.net.URL(WSRPRegistrationService_address), this);
217                 _stub.setPortName(getWSRPRegistrationServiceWSDDServiceName());
218                 return _stub;
219             }
220             if (oasis.names.tc.wsrp.v1.intf.WSRP_v1_Markup_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
221                 oasis.names.tc.wsrp.v1.bind.WSRP_v1_Markup_Binding_SOAPStub _stub = new oasis.names.tc.wsrp.v1.bind.WSRP_v1_Markup_Binding_SOAPStub(new java.net.URL(WSRPBaseService_address), this);
222                 _stub.setPortName(getWSRPBaseServiceWSDDServiceName());
223                 return _stub;
224             }
225             if (oasis.names.tc.wsrp.v1.intf.WSRP_v1_ServiceDescription_PortType.class.isAssignableFrom(serviceEndpointInterface)) {
226                 oasis.names.tc.wsrp.v1.bind.WSRP_v1_ServiceDescription_Binding_SOAPStub _stub = new oasis.names.tc.wsrp.v1.bind.WSRP_v1_ServiceDescription_Binding_SOAPStub(new java.net.URL(WSRPServiceDescriptionService_address), this);
227                 _stub.setPortName(getWSRPServiceDescriptionServiceWSDDServiceName());
228                 return _stub;
229             }
230         }
231         catch (java.lang.Throwable t) {
232             throw new javax.xml.rpc.ServiceException(t);
233         }
234         throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
235     }
236 
237     /**
238      * For the given interface, get the stub implementation.
239      * If this service has no port for the given interface,
240      * then ServiceException is thrown.
241      */
242     public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
243         if (portName == null) {
244             return getPort(serviceEndpointInterface);
245         }
246         java.lang.String inputPortName = portName.getLocalPart();
247         if ("WSRPPortletManagementService".equals(inputPortName)) {
248             return getWSRPPortletManagementService();
249         }
250         else if ("WSRPRegistrationService".equals(inputPortName)) {
251             return getWSRPRegistrationService();
252         }
253         else if ("WSRPBaseService".equals(inputPortName)) {
254             return getWSRPBaseService();
255         }
256         else if ("WSRPServiceDescriptionService".equals(inputPortName)) {
257             return getWSRPServiceDescriptionService();
258         }
259         else  {
260             java.rmi.Remote _stub = getPort(serviceEndpointInterface);
261             ((org.apache.axis.client.Stub) _stub).setPortName(portName);
262             return _stub;
263         }
264     }
265 
266     public javax.xml.namespace.QName getServiceName() {
267         return new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:wsdl", "WSRPService");
268     }
269 
270     private java.util.HashSet ports = null;
271 
272     public java.util.Iterator getPorts() {
273         if (ports == null) {
274             ports = new java.util.HashSet();
275             ports.add(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:wsdl", "WSRPPortletManagementService"));
276             ports.add(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:wsdl", "WSRPRegistrationService"));
277             ports.add(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:wsdl", "WSRPBaseService"));
278             ports.add(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:wsdl", "WSRPServiceDescriptionService"));
279         }
280         return ports.iterator();
281     }
282 
283     /**
284     * Set the endpoint address for the specified port name.
285     */
286     public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
287         if ("WSRPPortletManagementService".equals(portName)) {
288             setWSRPPortletManagementServiceEndpointAddress(address);
289         }
290         if ("WSRPRegistrationService".equals(portName)) {
291             setWSRPRegistrationServiceEndpointAddress(address);
292         }
293         if ("WSRPBaseService".equals(portName)) {
294             setWSRPBaseServiceEndpointAddress(address);
295         }
296         if ("WSRPServiceDescriptionService".equals(portName)) {
297             setWSRPServiceDescriptionServiceEndpointAddress(address);
298         }
299         else { // Unknown Port Name
300             throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
301         }
302     }
303 
304     /**
305     * Set the endpoint address for the specified port name.
306     */
307     public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
308         setEndpointAddress(portName.getLocalPart(), address);
309     }
310 
311 }
312