001: /**
002: * OPCServiceImplServiceLocator.java
003: *
004: * This file was auto-generated from WSDL
005: * by the Apache Axis WSDL2Java emitter.
006: */package com.sun.j2ee.blueprints.supplier.webservice.opcclient;
007:
008: public class OPCServiceImplServiceLocator extends
009: org.apache.axis.client.Service
010: implements
011: com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCServiceImplService {
012:
013: // Use to get a proxy class for OPCWebService
014: private final java.lang.String OPCWebService_address = "http://localhost:8080/opc/services/OPCWebService";
015:
016: public java.lang.String getOPCWebServiceAddress() {
017: return OPCWebService_address;
018: }
019:
020: // The WSDD service name defaults to the port name.
021: private java.lang.String OPCWebServiceWSDDServiceName = "OPCWebService";
022:
023: public java.lang.String getOPCWebServiceWSDDServiceName() {
024: return OPCWebServiceWSDDServiceName;
025: }
026:
027: public void setOPCWebServiceWSDDServiceName(java.lang.String name) {
028: OPCWebServiceWSDDServiceName = name;
029: }
030:
031: public com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCServiceImpl getOPCWebService()
032: throws javax.xml.rpc.ServiceException {
033: java.net.URL endpoint;
034: try {
035: endpoint = new java.net.URL(OPCWebService_address);
036: } catch (java.net.MalformedURLException e) {
037: throw new javax.xml.rpc.ServiceException(e);
038: }
039: return getOPCWebService(endpoint);
040: }
041:
042: public com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCServiceImpl getOPCWebService(
043: java.net.URL portAddress)
044: throws javax.xml.rpc.ServiceException {
045: try {
046: com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCWebServiceSoapBindingStub _stub = new com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCWebServiceSoapBindingStub(
047: portAddress, this );
048: _stub.setPortName(getOPCWebServiceWSDDServiceName());
049: return _stub;
050: } catch (org.apache.axis.AxisFault e) {
051: return null;
052: }
053: }
054:
055: /**
056: * For the given interface, get the stub implementation.
057: * If this service has no port for the given interface,
058: * then ServiceException is thrown.
059: */
060: public java.rmi.Remote getPort(Class serviceEndpointInterface)
061: throws javax.xml.rpc.ServiceException {
062: try {
063: if (com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCServiceImpl.class
064: .isAssignableFrom(serviceEndpointInterface)) {
065: com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCWebServiceSoapBindingStub _stub = new com.sun.j2ee.blueprints.supplier.webservice.opcclient.OPCWebServiceSoapBindingStub(
066: new java.net.URL(OPCWebService_address), this );
067: _stub.setPortName(getOPCWebServiceWSDDServiceName());
068: return _stub;
069: }
070: } catch (java.lang.Throwable t) {
071: throw new javax.xml.rpc.ServiceException(t);
072: }
073: throw new javax.xml.rpc.ServiceException(
074: "There is no stub implementation for the interface: "
075: + (serviceEndpointInterface == null ? "null"
076: : serviceEndpointInterface.getName()));
077: }
078:
079: /**
080: * For the given interface, get the stub implementation.
081: * If this service has no port for the given interface,
082: * then ServiceException is thrown.
083: */
084: public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
085: Class serviceEndpointInterface)
086: throws javax.xml.rpc.ServiceException {
087: if (portName == null) {
088: return getPort(serviceEndpointInterface);
089: }
090: String inputPortName = portName.getLocalPart();
091: if ("OPCWebService".equals(inputPortName)) {
092: return getOPCWebService();
093: } else {
094: java.rmi.Remote _stub = getPort(serviceEndpointInterface);
095: ((org.apache.axis.client.Stub) _stub).setPortName(portName);
096: return _stub;
097: }
098: }
099:
100: public javax.xml.namespace.QName getServiceName() {
101: return new javax.xml.namespace.QName(
102: "http://localhost:8080/opc/services/OPCWebService",
103: "OPCServiceImplService");
104: }
105:
106: private java.util.HashSet ports = null;
107:
108: public java.util.Iterator getPorts() {
109: if (ports == null) {
110: ports = new java.util.HashSet();
111: ports.add(new javax.xml.namespace.QName("OPCWebService"));
112: }
113: return ports.iterator();
114: }
115:
116: }
|