KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > tableappclient > business > axis > WelcomePresentationServiceLocator


1 /**
2  * WelcomePresentationServiceLocator.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
6  */

7
8 package tableappclient.business.axis;
9
10 public class WelcomePresentationServiceLocator
11     extends org.apache.axis.client.Service
12     implements tableappclient.business.axis.WelcomePresentationService {
13
14   public WelcomePresentationServiceLocator() {
15   }
16
17   public WelcomePresentationServiceLocator(org.apache.axis.EngineConfiguration
18                                            config) {
19     super(config);
20   }
21
22   // Use to get a proxy class for tableApp
23
private java.lang.String JavaDoc tableApp_address =
24       "http://localhost:8080/tableApp/tableApp";
25
26   public java.lang.String JavaDoc gettableAppAddress() {
27     return tableApp_address;
28   }
29
30   // The WSDD service name defaults to the port name.
31
private java.lang.String JavaDoc tableAppWSDDServiceName = "tableApp";
32
33   public java.lang.String JavaDoc gettableAppWSDDServiceName() {
34     return tableAppWSDDServiceName;
35   }
36
37   public void settableAppWSDDServiceName(java.lang.String JavaDoc name) {
38     tableAppWSDDServiceName = name;
39   }
40
41   public tableappclient.business.axis.WelcomePresentation gettableApp() throws
42       javax.xml.rpc.ServiceException JavaDoc {
43     java.net.URL JavaDoc endpoint;
44     try {
45       endpoint = new java.net.URL JavaDoc(tableApp_address);
46     }
47     catch (java.net.MalformedURLException JavaDoc e) {
48       throw new javax.xml.rpc.ServiceException JavaDoc(e);
49     }
50     return gettableApp(endpoint);
51   }
52
53   public tableappclient.business.axis.WelcomePresentation gettableApp(java.net.
54
JavaDoc      URL portAddress) throws javax.xml.rpc.ServiceException JavaDoc {
55     try {
56       tableappclient.business.axis.TableAppSoapBindingStub _stub = new
57           tableappclient.business.axis.TableAppSoapBindingStub(portAddress, this);
58       _stub.setPortName(gettableAppWSDDServiceName());
59       return _stub;
60     }
61     catch (org.apache.axis.AxisFault e) {
62       return null;
63     }
64   }
65
66   public void settableAppEndpointAddress(java.lang.String JavaDoc address) {
67     tableApp_address = address;
68   }
69
70   /**
71    * For the given interface, get the stub implementation.
72    * If this service has no port for the given interface,
73    * then ServiceException is thrown.
74    */

75   public java.rmi.Remote JavaDoc getPort(Class JavaDoc serviceEndpointInterface) throws javax.
76
JavaDoc      xml.rpc.ServiceException {
77     try {
78       if (tableappclient.business.axis.WelcomePresentation.class.
79           isAssignableFrom(serviceEndpointInterface)) {
80         tableappclient.business.axis.TableAppSoapBindingStub _stub = new
81             tableappclient.business.axis.TableAppSoapBindingStub(new java.net.
82
JavaDoc            URL(tableApp_address), this);
83         _stub.setPortName(gettableAppWSDDServiceName());
84         return _stub;
85       }
86     }
87     catch (java.lang.Throwable JavaDoc t) {
88       throw new javax.xml.rpc.ServiceException JavaDoc(t);
89     }
90     throw new javax.xml.rpc.ServiceException JavaDoc(
91         "There is no stub implementation for the interface: " +
92         (serviceEndpointInterface == null ? "null" :
93          serviceEndpointInterface.getName()));
94   }
95
96   /**
97    * For the given interface, get the stub implementation.
98    * If this service has no port for the given interface,
99    * then ServiceException is thrown.
100    */

101   public java.rmi.Remote JavaDoc getPort(javax.xml.namespace.QName JavaDoc portName,
102                                  Class JavaDoc serviceEndpointInterface) throws javax.
103
JavaDoc      xml.rpc.ServiceException {
104     if (portName == null) {
105       return getPort(serviceEndpointInterface);
106     }
107     java.lang.String JavaDoc inputPortName = portName.getLocalPart();
108     if ("tableApp".equals(inputPortName)) {
109       return gettableApp();
110     }
111     else {
112       java.rmi.Remote JavaDoc _stub = getPort(serviceEndpointInterface);
113       ( (org.apache.axis.client.Stub) _stub).setPortName(portName);
114       return _stub;
115     }
116   }
117
118   public javax.xml.namespace.QName JavaDoc getServiceName() {
119     return new javax.xml.namespace.QName JavaDoc("urn:tableApp",
120                                          "WelcomePresentationService");
121   }
122
123   private java.util.HashSet JavaDoc ports = null;
124
125   public java.util.Iterator JavaDoc getPorts() {
126     if (ports == null) {
127       ports = new java.util.HashSet JavaDoc();
128       ports.add(new javax.xml.namespace.QName JavaDoc("urn:tableApp", "tableApp"));
129     }
130     return ports.iterator();
131   }
132
133   /**
134    * Set the endpoint address for the specified port name.
135    */

136   public void setEndpointAddress(java.lang.String JavaDoc portName,
137                                  java.lang.String JavaDoc address) throws javax.xml.rpc.
138
JavaDoc      ServiceException {
139     if ("tableApp".equals(portName)) {
140       settableAppEndpointAddress(address);
141     }
142     else { // Unknown Port Name
143
throw new javax.xml.rpc.ServiceException JavaDoc(
144           " Cannot set Endpoint Address for Unknown Port" + portName);
145     }
146   }
147
148   /**
149    * Set the endpoint address for the specified port name.
150    */

151   public void setEndpointAddress(javax.xml.namespace.QName JavaDoc portName,
152                                  java.lang.String JavaDoc address) throws javax.xml.rpc.
153
JavaDoc      ServiceException {
154     setEndpointAddress(portName.getLocalPart(), address);
155   }
156
157 }
158
Popular Tags