001: /**
002: * ISQLTestServiceLocator.java
003: *
004: * This file was auto-generated from WSDL
005: * by the Apache Axis 1.4 Nov 19, 2006 (02:31:34 GMT+00:00) WSDL2Java emitter.
006: */package org.objectweb.salome_tmf.soap;
007:
008: import org.objectweb.salome_tmf.api.sql.ISQLTest;
009:
010: public class ISQLTestServiceLocator extends
011: org.apache.axis.client.Service implements ISQLTestService {
012:
013: public ISQLTestServiceLocator() {
014: }
015:
016: public ISQLTestServiceLocator(
017: org.apache.axis.EngineConfiguration config) {
018: super (config);
019: }
020:
021: public ISQLTestServiceLocator(java.lang.String wsdlLoc,
022: javax.xml.namespace.QName sName)
023: throws javax.xml.rpc.ServiceException {
024: super (wsdlLoc, sName);
025: }
026:
027: // Use to get a proxy class for SQLTest
028: private java.lang.String SQLTest_address = SOAPConstants
029: .getUrlWebService()
030: + "SQLTest";
031:
032: public java.lang.String getSQLTestAddress() {
033: return SQLTest_address;
034: }
035:
036: // The WSDD service name defaults to the port name.
037: private java.lang.String SQLTestWSDDServiceName = "SQLTest";
038:
039: public java.lang.String getSQLTestWSDDServiceName() {
040: return SQLTestWSDDServiceName;
041: }
042:
043: public void setSQLTestWSDDServiceName(java.lang.String name) {
044: SQLTestWSDDServiceName = name;
045: }
046:
047: public ISQLTest getSQLTest() throws javax.xml.rpc.ServiceException {
048: java.net.URL endpoint;
049: try {
050: endpoint = new java.net.URL(SQLTest_address);
051: } catch (java.net.MalformedURLException e) {
052: throw new javax.xml.rpc.ServiceException(e);
053: }
054: return getSQLTest(endpoint);
055: }
056:
057: public ISQLTest getSQLTest(java.net.URL portAddress)
058: throws javax.xml.rpc.ServiceException {
059: try {
060: SQLTestSoapBindingStub _stub = new SQLTestSoapBindingStub(
061: portAddress, this );
062: _stub.setPortName(getSQLTestWSDDServiceName());
063: return _stub;
064: } catch (org.apache.axis.AxisFault e) {
065: return null;
066: }
067: }
068:
069: public void setSQLTestEndpointAddress(java.lang.String address) {
070: SQLTest_address = address;
071: }
072:
073: /**
074: * For the given interface, get the stub implementation.
075: * If this service has no port for the given interface,
076: * then ServiceException is thrown.
077: */
078: public java.rmi.Remote getPort(Class serviceEndpointInterface)
079: throws javax.xml.rpc.ServiceException {
080: try {
081: if (ISQLTest.class
082: .isAssignableFrom(serviceEndpointInterface)) {
083: SQLTestSoapBindingStub _stub = new SQLTestSoapBindingStub(
084: new java.net.URL(SQLTest_address), this );
085: _stub.setPortName(getSQLTestWSDDServiceName());
086: return _stub;
087: }
088: } catch (java.lang.Throwable t) {
089: throw new javax.xml.rpc.ServiceException(t);
090: }
091: throw new javax.xml.rpc.ServiceException(
092: "There is no stub implementation for the interface: "
093: + (serviceEndpointInterface == null ? "null"
094: : serviceEndpointInterface.getName()));
095: }
096:
097: /**
098: * For the given interface, get the stub implementation.
099: * If this service has no port for the given interface,
100: * then ServiceException is thrown.
101: */
102: public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
103: Class serviceEndpointInterface)
104: throws javax.xml.rpc.ServiceException {
105: if (portName == null) {
106: return getPort(serviceEndpointInterface);
107: }
108: java.lang.String inputPortName = portName.getLocalPart();
109: if ("SQLTest".equals(inputPortName)) {
110: return getSQLTest();
111: } else {
112: java.rmi.Remote _stub = getPort(serviceEndpointInterface);
113: ((org.apache.axis.client.Stub) _stub).setPortName(portName);
114: return _stub;
115: }
116: }
117:
118: public javax.xml.namespace.QName getServiceName() {
119: return new javax.xml.namespace.QName(
120: "http://soap.salome_tmf.objectweb.org",
121: "ISQLTestService");
122: }
123:
124: private java.util.HashSet ports = null;
125:
126: public java.util.Iterator getPorts() {
127: if (ports == null) {
128: ports = new java.util.HashSet();
129: ports.add(new javax.xml.namespace.QName(
130: "http://soap.salome_tmf.objectweb.org", "SQLTest"));
131: }
132: return ports.iterator();
133: }
134:
135: /**
136: * Set the endpoint address for the specified port name.
137: */
138: public void setEndpointAddress(java.lang.String portName,
139: java.lang.String address)
140: throws javax.xml.rpc.ServiceException {
141:
142: if ("SQLTest".equals(portName)) {
143: setSQLTestEndpointAddress(address);
144: } else { // Unknown Port Name
145: throw new javax.xml.rpc.ServiceException(
146: " Cannot set Endpoint Address for Unknown Port"
147: + portName);
148: }
149: }
150:
151: /**
152: * Set the endpoint address for the specified port name.
153: */
154: public void setEndpointAddress(javax.xml.namespace.QName portName,
155: java.lang.String address)
156: throws javax.xml.rpc.ServiceException {
157: setEndpointAddress(portName.getLocalPart(), address);
158: }
159:
160: }
|