KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > j2ee > blueprints > supplier > webservice > opcclient > OPCServiceImplServiceLocator


1 /**
2  * OPCServiceImplServiceLocator.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis WSDL2Java emitter.
6  */

7
8 package com.sun.j2ee.blueprints.supplier.webservice.opcclient;
9
10 public class OPCServiceImplServiceLocator extends org.apache.axis.client.Service implements com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCServiceImplService {
11
12     // Use to get a proxy class for OPCWebService
13
private final java.lang.String OPCWebService_address = "http://localhost:8080/opc/services/OPCWebService";
14
15     public java.lang.String getOPCWebServiceAddress() {
16         return OPCWebService_address;
17     }
18
19     // The WSDD service name defaults to the port name.
20
private java.lang.String OPCWebServiceWSDDServiceName = "OPCWebService";
21
22     public java.lang.String getOPCWebServiceWSDDServiceName() {
23         return OPCWebServiceWSDDServiceName;
24     }
25
26     public void setOPCWebServiceWSDDServiceName(java.lang.String name) {
27         OPCWebServiceWSDDServiceName = name;
28     }
29
30     public com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCServiceImpl getOPCWebService() throws javax.xml.rpc.ServiceException {
31        java.net.URL endpoint;
32         try {
33             endpoint = new java.net.URL(OPCWebService_address);
34         }
35         catch (java.net.MalformedURLException e) {
36             throw new javax.xml.rpc.ServiceException(e);
37         }
38         return getOPCWebService(endpoint);
39     }
40
41     public com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCServiceImpl getOPCWebService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
42         try {
43             com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCWebServiceSoapBindingStub _stub = new com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCWebServiceSoapBindingStub(portAddress, this);
44             _stub.setPortName(getOPCWebServiceWSDDServiceName());
45             return _stub;
46         }
47         catch (org.apache.axis.AxisFault e) {
48             return null;
49         }
50     }
51
52     /**
53      * For the given interface, get the stub implementation.
54      * If this service has no port for the given interface,
55      * then ServiceException is thrown.
56      */

57     public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
58         try {
59             if (com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCServiceImpl.class.isAssignableFrom(serviceEndpointInterface)) {
60                 com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCWebServiceSoapBindingStub _stub = new com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCWebServiceSoapBindingStub(new java.net.URL(OPCWebService_address), this);
61                 _stub.setPortName(getOPCWebServiceWSDDServiceName());
62                 return _stub;
63             }
64         }
65         catch (java.lang.Throwable t) {
66             throw new javax.xml.rpc.ServiceException(t);
67         }
68         throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
69     }
70
71     /**
72      * For the given interface, get the stub implementation.
73      * If this service has no port for the given interface,
74      * then ServiceException is thrown.
75      */

76     public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
77         if (portName == null) {
78             return getPort(serviceEndpointInterface);
79         }
80         String inputPortName = portName.getLocalPart();
81         if ("OPCWebService".equals(inputPortName)) {
82             return getOPCWebService();
83         }
84         else {
85             java.rmi.Remote _stub = getPort(serviceEndpointInterface);
86             ((org.apache.axis.client.Stub) _stub).setPortName(portName);
87             return _stub;
88         }
89     }
90
91     public javax.xml.namespace.QName getServiceName() {
92         return new javax.xml.namespace.QName("http://localhost:8080/opc/services/OPCWebService", "OPCServiceImplService");
93     }
94
95     private java.util.HashSet ports = null;
96
97     public java.util.Iterator getPorts() {
98         if (ports == null) {
99             ports = new java.util.HashSet();
100             ports.add(new javax.xml.namespace.QName("OPCWebService"));
101         }
102         return ports.iterator();
103     }
104
105 }
106
Popular Tags