001: /**
002: * InteropDocSvcLocator.java
003: *
004: * This file was auto-generated from WSDL
005: * by the Apache Axis WSDL2Java emitter.
006: */package interop.wsifservice;
007:
008: public class InteropDocSvcLocator extends
009: org.apache.axis.client.Service implements
010: interop.wsifservice.InteropDocSvc {
011:
012: // Use to get a proxy class for interopDocPort
013: private final java.lang.String interopDocPort_address = "http://www.whitemesa.net/interopdoc";
014:
015: public java.lang.String getinteropDocPortAddress() {
016: return interopDocPort_address;
017: }
018:
019: // The WSDD service name defaults to the port name.
020: private java.lang.String interopDocPortWSDDServiceName = "interopDocPort";
021:
022: public java.lang.String getinteropDocPortWSDDServiceName() {
023: return interopDocPortWSDDServiceName;
024: }
025:
026: public void setinteropDocPortWSDDServiceName(java.lang.String name) {
027: interopDocPortWSDDServiceName = name;
028: }
029:
030: public interop.wsifservice.Doc_TestPortType getinteropDocPort()
031: throws javax.xml.rpc.ServiceException {
032: java.net.URL endpoint;
033: try {
034: endpoint = new java.net.URL(interopDocPort_address);
035: } catch (java.net.MalformedURLException e) {
036: return null; // unlikely as URL was validated in WSDL2Java
037: }
038: return getinteropDocPort(endpoint);
039: }
040:
041: public interop.wsifservice.Doc_TestPortType getinteropDocPort(
042: java.net.URL portAddress)
043: throws javax.xml.rpc.ServiceException {
044: try {
045: interop.wsifservice.Doc_Test_BindingStub _stub = new interop.wsifservice.Doc_Test_BindingStub(
046: portAddress, this );
047: _stub.setPortName(getinteropDocPortWSDDServiceName());
048: return _stub;
049: } catch (org.apache.axis.AxisFault e) {
050: return null;
051: }
052: }
053:
054: /**
055: * For the given interface, get the stub implementation.
056: * If this service has no port for the given interface,
057: * then ServiceException is thrown.
058: */
059: public java.rmi.Remote getPort(Class serviceEndpointInterface)
060: throws javax.xml.rpc.ServiceException {
061: try {
062: if (interop.wsifservice.Doc_TestPortType.class
063: .isAssignableFrom(serviceEndpointInterface)) {
064: interop.wsifservice.Doc_Test_BindingStub _stub = new interop.wsifservice.Doc_Test_BindingStub(
065: new java.net.URL(interopDocPort_address), this );
066: _stub.setPortName(getinteropDocPortWSDDServiceName());
067: return _stub;
068: }
069: } catch (java.lang.Throwable t) {
070: throw new javax.xml.rpc.ServiceException(t);
071: }
072: throw new javax.xml.rpc.ServiceException(
073: "There is no stub implementation for the interface: "
074: + (serviceEndpointInterface == null ? "null"
075: : serviceEndpointInterface.getName()));
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(javax.xml.namespace.QName portName,
084: Class serviceEndpointInterface)
085: throws javax.xml.rpc.ServiceException {
086: java.rmi.Remote _stub = getPort(serviceEndpointInterface);
087: ((org.apache.axis.client.Stub) _stub).setPortName(portName);
088: return _stub;
089: }
090:
091: public javax.xml.namespace.QName getServiceName() {
092: return new javax.xml.namespace.QName("http://soapinterop.org/",
093: "interopDocSvc");
094: }
095:
096: private java.util.HashSet ports = null;
097:
098: public java.util.Iterator getPorts() {
099: if (ports == null) {
100: ports = new java.util.HashSet();
101: ports.add(new javax.xml.namespace.QName("interopDocPort"));
102: }
103: return ports.iterator();
104: }
105:
106: }
|