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