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