001: /**
002: * HelloWsServiceLocator.java
003: *
004: * This file was auto-generated from WSDL
005: * by the Apache Axis WSDL2Java emitter.
006: */package org.objectweb.jonas.jtests.hello;
007:
008: import javax.xml.namespace.QName;
009:
010: public class HelloWsServiceLocator extends
011: org.objectweb.jonas.ws.axis.JService implements
012: org.objectweb.jonas.jtests.hello.HelloWsService {
013:
014: public HelloWsServiceLocator(String name, QName qname) {
015:
016: }
017:
018: // Use to get a proxy class for HelloPortComponent
019: private final java.lang.String HelloPortComponent_address = "http://dummy_location/HelloPortComponent";
020:
021: public java.lang.String getHelloPortComponentAddress() {
022: return HelloPortComponent_address;
023: }
024:
025: // The WSDD service name defaults to the port name.
026: private java.lang.String HelloPortComponentWSDDServiceName = "HelloPortComponent";
027:
028: public java.lang.String getHelloPortComponentWSDDServiceName() {
029: return HelloPortComponentWSDDServiceName;
030: }
031:
032: public void setHelloPortComponentWSDDServiceName(
033: java.lang.String name) {
034: HelloPortComponentWSDDServiceName = name;
035: }
036:
037: public org.objectweb.jonas.jtests.hello.HelloWs getHelloPortComponent()
038: throws javax.xml.rpc.ServiceException {
039: java.net.URL endpoint;
040: try {
041: endpoint = new java.net.URL(HelloPortComponent_address);
042: } catch (java.net.MalformedURLException e) {
043: throw new javax.xml.rpc.ServiceException(e);
044: }
045: return getHelloPortComponent(endpoint);
046: }
047:
048: public org.objectweb.jonas.jtests.hello.HelloWs getHelloPortComponent(
049: java.net.URL portAddress)
050: throws javax.xml.rpc.ServiceException {
051: try {
052: org.objectweb.jonas.jtests.hello.HelloPortComponentSoapBindingStub _stub = new org.objectweb.jonas.jtests.hello.HelloPortComponentSoapBindingStub(
053: portAddress, this );
054: _stub.setPortName(getHelloPortComponentWSDDServiceName());
055: return _stub;
056: } catch (org.apache.axis.AxisFault e) {
057: return null;
058: }
059: }
060:
061: /**
062: * For the given interface, get the stub implementation.
063: * If this service has no port for the given interface,
064: * then ServiceException is thrown.
065: */
066: public java.rmi.Remote getPort(Class serviceEndpointInterface)
067: throws javax.xml.rpc.ServiceException {
068: try {
069: if (org.objectweb.jonas.jtests.hello.HelloWs.class
070: .isAssignableFrom(serviceEndpointInterface)) {
071: org.objectweb.jonas.jtests.hello.HelloPortComponentSoapBindingStub _stub = new org.objectweb.jonas.jtests.hello.HelloPortComponentSoapBindingStub(
072: new java.net.URL(HelloPortComponent_address),
073: this );
074: _stub
075: .setPortName(getHelloPortComponentWSDDServiceName());
076: return _stub;
077: }
078: } catch (java.lang.Throwable t) {
079: throw new javax.xml.rpc.ServiceException(t);
080: }
081: throw new javax.xml.rpc.ServiceException(
082: "There is no stub implementation for the interface: "
083: + (serviceEndpointInterface == null ? "null"
084: : serviceEndpointInterface.getName()));
085: }
086:
087: /**
088: * For the given interface, get the stub implementation.
089: * If this service has no port for the given interface,
090: * then ServiceException is thrown.
091: */
092: public java.rmi.Remote getPort(javax.xml.namespace.QName portName,
093: Class serviceEndpointInterface)
094: throws javax.xml.rpc.ServiceException {
095: if (portName == null) {
096: return getPort(serviceEndpointInterface);
097: }
098: String inputPortName = portName.getLocalPart();
099: if ("HelloPortComponent".equals(inputPortName)) {
100: return getHelloPortComponent();
101: } else {
102: java.rmi.Remote _stub = getPort(serviceEndpointInterface);
103: ((org.apache.axis.client.Stub) _stub).setPortName(portName);
104: return _stub;
105: }
106: }
107:
108: public javax.xml.namespace.QName getServiceName() {
109: return new javax.xml.namespace.QName("http://hello.simple",
110: "HelloWsService");
111: }
112:
113: private java.util.HashSet ports = null;
114:
115: public java.util.Iterator getPorts() {
116: if (ports == null) {
117: ports = new java.util.HashSet();
118: ports.add(new javax.xml.namespace.QName(
119: "HelloPortComponent"));
120: }
121: return ports.iterator();
122: }
123:
124: }
|