KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * TableAppSoapBindingStub.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 TableAppSoapBindingStub
11     extends org.apache.axis.client.Stub
12     implements tableappclient.business.axis.WelcomePresentation {
13   private java.util.Vector JavaDoc cachedSerClasses = new java.util.Vector JavaDoc();
14   private java.util.Vector JavaDoc cachedSerQNames = new java.util.Vector JavaDoc();
15   private java.util.Vector JavaDoc cachedSerFactories = new java.util.Vector JavaDoc();
16   private java.util.Vector JavaDoc cachedDeserFactories = new java.util.Vector JavaDoc();
17
18   static org.apache.axis.description.OperationDesc[] _operations;
19
20   static {
21     _operations = new org.apache.axis.description.OperationDesc[2];
22     _initOperationDesc1();
23   }
24
25   private static void _initOperationDesc1() {
26     org.apache.axis.description.OperationDesc oper;
27     oper = new org.apache.axis.description.OperationDesc();
28     oper.setName("tableDoc");
29     oper.setReturnType(new javax.xml.namespace.QName JavaDoc(
30         "http://xml.apache.org/xml-soap", "Document"));
31     oper.setReturnClass(org.w3c.dom.Document JavaDoc.class);
32     oper.setReturnQName(new javax.xml.namespace.QName JavaDoc("", "tableDocReturn"));
33     oper.setStyle(org.apache.axis.constants.Style.RPC);
34     oper.setUse(org.apache.axis.constants.Use.ENCODED);
35     _operations[0] = oper;
36
37     oper = new org.apache.axis.description.OperationDesc();
38     oper.setName("returnAccess");
39     oper.setReturnType(new javax.xml.namespace.QName JavaDoc("urn:tableApp", "access"));
40     oper.setReturnClass(tableapp.spec.Access.class);
41     oper.setReturnQName(new javax.xml.namespace.QName JavaDoc("", "returnAccessReturn"));
42     oper.setStyle(org.apache.axis.constants.Style.RPC);
43     oper.setUse(org.apache.axis.constants.Use.ENCODED);
44     _operations[1] = oper;
45
46   }
47
48   public TableAppSoapBindingStub() throws org.apache.axis.AxisFault {
49     this(null);
50   }
51
52   public TableAppSoapBindingStub(java.net.URL JavaDoc endpointURL,
53                                  javax.xml.rpc.Service JavaDoc service) throws org.
54
      apache.axis.AxisFault {
55     this(service);
56     super.cachedEndpoint = endpointURL;
57   }
58
59   public TableAppSoapBindingStub(javax.xml.rpc.Service JavaDoc service) throws org.
60
      apache.axis.AxisFault {
61     if (service == null) {
62       super.service = new org.apache.axis.client.Service();
63     }
64     else {
65       super.service = service;
66     }
67     java.lang.Class JavaDoc cls;
68     javax.xml.namespace.QName JavaDoc qName;
69     java.lang.Class JavaDoc accsf = tableapp.business.axis.AccessSerFactory.class;
70     java.lang.Class JavaDoc accdf = tableapp.business.axis.AccessDeserFactory.class;
71     java.lang.Class JavaDoc beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
72     java.lang.Class JavaDoc beandf = org.apache.axis.encoding.ser.
73
        BeanDeserializerFactory.class;
74     java.lang.Class JavaDoc enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
75     java.lang.Class JavaDoc enumdf = org.apache.axis.encoding.ser.
76
        EnumDeserializerFactory.class;
77     java.lang.Class JavaDoc arraysf = org.apache.axis.encoding.ser.
78
        ArraySerializerFactory.class;
79     java.lang.Class JavaDoc arraydf = org.apache.axis.encoding.ser.
80
        ArrayDeserializerFactory.class;
81     java.lang.Class JavaDoc simplesf = org.apache.axis.encoding.ser.
82
        SimpleSerializerFactory.class;
83     java.lang.Class JavaDoc simpledf = org.apache.axis.encoding.ser.
84
        SimpleDeserializerFactory.class;
85     java.lang.Class JavaDoc simplelistsf = org.apache.axis.encoding.ser.
86
        SimpleListSerializerFactory.class;
87     java.lang.Class JavaDoc simplelistdf = org.apache.axis.encoding.ser.
88
        SimpleListDeserializerFactory.class;
89     qName = new javax.xml.namespace.QName JavaDoc("urn:tableApp", "access");
90     cachedSerQNames.add(qName);
91     cls = tableapp.spec.Access.class;
92     cachedSerClasses.add(cls);
93     cachedSerFactories.add(accsf);
94     cachedDeserFactories.add(accdf);
95
96   }
97
98   protected org.apache.axis.client.Call createCall() throws java.rmi.
99
JavaDoc      RemoteException {
100     try {
101       org.apache.axis.client.Call _call =
102           (org.apache.axis.client.Call)super.service.createCall();
103       if (super.maintainSessionSet) {
104         _call.setMaintainSession(super.maintainSession);
105       }
106       if (super.cachedUsername != null) {
107         _call.setUsername(super.cachedUsername);
108       }
109       if (super.cachedPassword != null) {
110         _call.setPassword(super.cachedPassword);
111       }
112       if (super.cachedEndpoint != null) {
113         _call.setTargetEndpointAddress(super.cachedEndpoint);
114       }
115       if (super.cachedTimeout != null) {
116         _call.setTimeout(super.cachedTimeout);
117       }
118       if (super.cachedPortName != null) {
119         _call.setPortName(super.cachedPortName);
120       }
121       java.util.Enumeration JavaDoc keys = super.cachedProperties.keys();
122       while (keys.hasMoreElements()) {
123         java.lang.String JavaDoc key = (java.lang.String JavaDoc) keys.nextElement();
124         _call.setProperty(key, super.cachedProperties.get(key));
125       }
126       // All the type mapping information is registered
127
// when the first call is made.
128
// The type mapping information is actually registered in
129
// the TypeMappingRegistry of the service, which
130
// is the reason why registration is only needed for the first call.
131
synchronized (this) {
132         if (firstCall()) {
133           // must set encoding style before registering serializers
134
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.
135                                SOAP11_CONSTANTS);
136           _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
137           for (int i = 0; i < cachedSerFactories.size(); ++i) {
138             java.lang.Class JavaDoc cls = (java.lang.Class JavaDoc) cachedSerClasses.get(i);
139             javax.xml.namespace.QName JavaDoc qName =
140                 (javax.xml.namespace.QName JavaDoc) cachedSerQNames.get(i);
141             java.lang.Class JavaDoc sf = (java.lang.Class JavaDoc)
142                 cachedSerFactories.get(i);
143             java.lang.Class JavaDoc df = (java.lang.Class JavaDoc)
144                 cachedDeserFactories.get(i);
145             _call.registerTypeMapping(cls, qName, sf, df, false);
146           }
147         }
148       }
149       return _call;
150     }
151     catch (java.lang.Throwable JavaDoc _t) {
152       throw new org.apache.axis.AxisFault(
153           "Failure trying to get the Call object", _t);
154     }
155   }
156
157   public org.w3c.dom.Document JavaDoc tableDoc() throws java.rmi.RemoteException JavaDoc {
158     if (super.cachedEndpoint == null) {
159       throw new org.apache.axis.NoEndPointException();
160     }
161     org.apache.axis.client.Call _call = createCall();
162     _call.setOperation(_operations[0]);
163     _call.setUseSOAPAction(true);
164     _call.setSOAPActionURI("");
165     _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
166     _call.setOperationName(new javax.xml.namespace.QName JavaDoc("urn:tableApp",
167         "tableDoc"));
168
169     setRequestHeaders(_call);
170     setAttachments(_call);
171     java.lang.Object JavaDoc _resp = _call.invoke(new java.lang.Object JavaDoc[] {});
172
173     if (_resp instanceof java.rmi.RemoteException JavaDoc) {
174       throw (java.rmi.RemoteException JavaDoc) _resp;
175     }
176     else {
177       extractAttachments(_call);
178       try {
179         return (org.w3c.dom.Document JavaDoc) _resp;
180       }
181       catch (java.lang.Exception JavaDoc _exception) {
182         return (org.w3c.dom.Document JavaDoc) org.apache.axis.utils.JavaUtils.convert(
183             _resp, org.w3c.dom.Document JavaDoc.class);
184       }
185     }
186   }
187
188   public tableapp.spec.Access returnAccess() throws java.rmi.RemoteException JavaDoc {
189     if (super.cachedEndpoint == null) {
190       throw new org.apache.axis.NoEndPointException();
191     }
192     org.apache.axis.client.Call _call = createCall();
193     _call.setOperation(_operations[1]);
194     _call.setUseSOAPAction(true);
195     _call.setSOAPActionURI("");
196     _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
197     _call.setOperationName(new javax.xml.namespace.QName JavaDoc("urn:tableApp",
198         "returnAccess"));
199
200     setRequestHeaders(_call);
201     setAttachments(_call);
202     java.lang.Object JavaDoc _resp = _call.invoke(new java.lang.Object JavaDoc[] {});
203
204     if (_resp instanceof java.rmi.RemoteException JavaDoc) {
205       throw (java.rmi.RemoteException JavaDoc) _resp;
206     }
207     else {
208       extractAttachments(_call);
209       try {
210         return (tableapp.spec.Access) _resp;
211       }
212       catch (java.lang.Exception JavaDoc _exception) {
213         return (tableapp.spec.Access) org.apache.axis.utils.JavaUtils.convert(
214             _resp, tableapp.spec.Access.class);
215       }
216     }
217   }
218
219 }
220
Popular Tags