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