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