001: /**
002: * ISQLExecutionServiceLocator.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.ISQLExecution;
009:
010: public class ISQLExecutionServiceLocator extends
011: org.apache.axis.client.Service implements ISQLExecutionService {
012:
013: public ISQLExecutionServiceLocator() {
014: }
015:
016: public ISQLExecutionServiceLocator(
017: org.apache.axis.EngineConfiguration config) {
018: super (config);
019: }
020:
021: public ISQLExecutionServiceLocator(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 SQLExecution
028: private java.lang.String SQLExecution_address = SOAPConstants
029: .getUrlWebService()
030: + "SQLExecution";
031:
032: public java.lang.String getSQLExecutionAddress() {
033: return SQLExecution_address;
034: }
035:
036: // The WSDD service name defaults to the port name.
037: private java.lang.String SQLExecutionWSDDServiceName = "SQLExecution";
038:
039: public java.lang.String getSQLExecutionWSDDServiceName() {
040: return SQLExecutionWSDDServiceName;
041: }
042:
043: public void setSQLExecutionWSDDServiceName(java.lang.String name) {
044: SQLExecutionWSDDServiceName = name;
045: }
046:
047: public ISQLExecution getSQLExecution()
048: throws javax.xml.rpc.ServiceException {
049: java.net.URL endpoint;
050: try {
051: endpoint = new java.net.URL(SQLExecution_address);
052: } catch (java.net.MalformedURLException e) {
053: throw new javax.xml.rpc.ServiceException(e);
054: }
055: return getSQLExecution(endpoint);
056: }
057:
058: public ISQLExecution getSQLExecution(java.net.URL portAddress)
059: throws javax.xml.rpc.ServiceException {
060: try {
061: SQLExecutionSoapBindingStub _stub = new SQLExecutionSoapBindingStub(
062: portAddress, this );
063: _stub.setPortName(getSQLExecutionWSDDServiceName());
064: return _stub;
065: } catch (org.apache.axis.AxisFault e) {
066: return null;
067: }
068: }
069:
070: public void setSQLExecutionEndpointAddress(java.lang.String address) {
071: SQLExecution_address = address;
072: }
073:
074: /**
075: * For the given interface, get the stub implementation.
076: * If this service has no port for the given interface,
077: * then ServiceException is thrown.
078: */
079: public java.rmi.Remote getPort(Class serviceEndpointInterface)
080: throws javax.xml.rpc.ServiceException {
081: try {
082: if (ISQLExecution.class
083: .isAssignableFrom(serviceEndpointInterface)) {
084: SQLExecutionSoapBindingStub _stub = new SQLExecutionSoapBindingStub(
085: new java.net.URL(SQLExecution_address), this );
086: _stub.setPortName(getSQLExecutionWSDDServiceName());
087: return _stub;
088: }
089: } catch (java.lang.Throwable t) {
090: throw new javax.xml.rpc.ServiceException(t);
091: }
092: throw new javax.xml.rpc.ServiceException(
093: "There is no stub implementation for the interface: "
094: + (serviceEndpointInterface == null ? "null"
095: : serviceEndpointInterface.getName()));
096: }
097:
098: /**
099: * For the given interface, get the stub implementation.
100: * If this service has no port for the given interface,
101: * then ServiceException is thrown.
102: */
103: public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
104: Class serviceEndpointInterface)
105: throws javax.xml.rpc.ServiceException {
106: if (portName == null) {
107: return getPort(serviceEndpointInterface);
108: }
109: java.lang.String inputPortName = portName.getLocalPart();
110: if ("SQLExecution".equals(inputPortName)) {
111: return getSQLExecution();
112: } else {
113: java.rmi.Remote _stub = getPort(serviceEndpointInterface);
114: ((org.apache.axis.client.Stub) _stub).setPortName(portName);
115: return _stub;
116: }
117: }
118:
119: public javax.xml.namespace.QName getServiceName() {
120: return new javax.xml.namespace.QName(
121: "http://soap.salome_tmf.objectweb.org",
122: "ISQLExecutionService");
123: }
124:
125: private java.util.HashSet ports = null;
126:
127: public java.util.Iterator getPorts() {
128: if (ports == null) {
129: ports = new java.util.HashSet();
130: ports.add(new javax.xml.namespace.QName(
131: "http://soap.salome_tmf.objectweb.org",
132: "SQLExecution"));
133: }
134: return ports.iterator();
135: }
136:
137: /**
138: * Set the endpoint address for the specified port name.
139: */
140: public void setEndpointAddress(java.lang.String portName,
141: java.lang.String address)
142: throws javax.xml.rpc.ServiceException {
143:
144: if ("SQLExecution".equals(portName)) {
145: setSQLExecutionEndpointAddress(address);
146: } else { // Unknown Port Name
147: throw new javax.xml.rpc.ServiceException(
148: " Cannot set Endpoint Address for Unknown Port"
149: + portName);
150: }
151: }
152:
153: /**
154: * Set the endpoint address for the specified port name.
155: */
156: public void setEndpointAddress(javax.xml.namespace.QName portName,
157: java.lang.String address)
158: throws javax.xml.rpc.ServiceException {
159: setEndpointAddress(portName.getLocalPart(), address);
160: }
161:
162: }
|