KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > interop > wsifservice > Doc_Test_BindingStub


1 /**
2  * Doc_Test_BindingStub.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis WSDL2Java emitter.
6  */

7
8 package interop.wsifservice;
9
10 public class Doc_Test_BindingStub extends org.apache.axis.client.Stub implements interop.wsifservice.Doc_TestPortType {
11     private java.util.Vector JavaDoc cachedSerClasses = new java.util.Vector JavaDoc();
12     private java.util.Vector JavaDoc cachedSerQNames = new java.util.Vector JavaDoc();
13     private java.util.Vector JavaDoc cachedSerFactories = new java.util.Vector JavaDoc();
14     private java.util.Vector JavaDoc cachedDeserFactories = new java.util.Vector JavaDoc();
15
16     public Doc_Test_BindingStub() throws org.apache.axis.AxisFault {
17          this(null);
18     }
19
20     public Doc_Test_BindingStub(java.net.URL JavaDoc endpointURL, javax.xml.rpc.Service JavaDoc service) throws org.apache.axis.AxisFault {
21          this(service);
22          super.cachedEndpoint = endpointURL;
23     }
24
25     public Doc_Test_BindingStub(javax.xml.rpc.Service JavaDoc service) throws org.apache.axis.AxisFault {
26         if (service == null) {
27             super.service = new org.apache.axis.client.Service();
28         } else {
29             super.service = service;
30         }
31             java.lang.Class JavaDoc cls;
32             javax.xml.namespace.QName JavaDoc qName;
33             java.lang.Class JavaDoc beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
34             java.lang.Class JavaDoc beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
35             java.lang.Class JavaDoc enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
36             java.lang.Class JavaDoc enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
37             java.lang.Class JavaDoc arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
38             java.lang.Class JavaDoc arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
39             java.lang.Class JavaDoc simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
40             java.lang.Class JavaDoc simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
41             qName = new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "ArrayOfSimpleDocument");
42             cachedSerQNames.add(qName);
43             cls = interop.wsifservice.ArrayOfSimpleDocument.class;
44             cachedSerClasses.add(cls);
45             cachedSerFactories.add(beansf);
46             cachedDeserFactories.add(beandf);
47
48             qName = new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "ChildDocument");
49             cachedSerQNames.add(qName);
50             cls = interop.wsifservice.ChildDocument.class;
51             cachedSerClasses.add(cls);
52             cachedSerFactories.add(beansf);
53             cachedDeserFactories.add(beandf);
54
55             qName = new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SingleTag");
56             cachedSerQNames.add(qName);
57             cls = interop.wsifservice.SingleTag_Type.class;
58             cachedSerClasses.add(cls);
59             cachedSerFactories.add(beansf);
60             cachedDeserFactories.add(beandf);
61
62             qName = new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "ComplexDocument");
63             cachedSerQNames.add(qName);
64             cls = interop.wsifservice.ComplexDocument_Type.class;
65             cachedSerClasses.add(cls);
66             cachedSerFactories.add(beansf);
67             cachedDeserFactories.add(beandf);
68
69             qName = new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SimpleDocument");
70             cachedSerQNames.add(qName);
71             cls = interop.wsifservice.SimpleDocument_Type.class;
72             cachedSerClasses.add(cls);
73             cachedSerFactories.add(simplesf);
74             cachedDeserFactories.add(simpledf);
75
76     }
77
78     private org.apache.axis.client.Call createCall() throws java.rmi.RemoteException JavaDoc {
79         try {
80             org.apache.axis.client.Call _call =
81                     (org.apache.axis.client.Call) super.service.createCall();
82             if (super.maintainSessionSet) {
83                 _call.setMaintainSession(super.maintainSession);
84             }
85             if (super.cachedUsername != null) {
86                 _call.setUsername(super.cachedUsername);
87             }
88             if (super.cachedPassword != null) {
89                 _call.setPassword(super.cachedPassword);
90             }
91             if (super.cachedEndpoint != null) {
92                 _call.setTargetEndpointAddress(super.cachedEndpoint);
93             }
94             if (super.cachedTimeout != null) {
95                 _call.setTimeout(super.cachedTimeout);
96             }
97             if (super.cachedPortName != null) {
98                 _call.setPortName(super.cachedPortName);
99             }
100             java.util.Enumeration JavaDoc keys = super.cachedProperties.keys();
101             while (keys.hasMoreElements()) {
102                 java.lang.String JavaDoc key = (java.lang.String JavaDoc) keys.nextElement();
103                 if(_call.isPropertySupported(key))
104                     _call.setProperty(key, super.cachedProperties.get(key));
105                 else
106                     _call.setScopedProperty(key, super.cachedProperties.get(key));
107             }
108             // All the type mapping information is registered
109
// when the first call is made.
110
// The type mapping information is actually registered in
111
// the TypeMappingRegistry of the service, which
112
// is the reason why registration is only needed for the first call.
113
synchronized (this) {
114                 if (firstCall()) {
115                     // must set encoding style before registering serializers
116
_call.setEncodingStyle(null);
117                     for (int i = 0; i < cachedSerFactories.size(); ++i) {
118                         java.lang.Class JavaDoc cls = (java.lang.Class JavaDoc) cachedSerClasses.get(i);
119                         javax.xml.namespace.QName JavaDoc qName =
120                                 (javax.xml.namespace.QName JavaDoc) cachedSerQNames.get(i);
121                         java.lang.Class JavaDoc sf = (java.lang.Class JavaDoc)
122                                  cachedSerFactories.get(i);
123                         java.lang.Class JavaDoc df = (java.lang.Class JavaDoc)
124                                  cachedDeserFactories.get(i);
125                         _call.registerTypeMapping(cls, qName, sf, df, false);
126                     }
127                 }
128             }
129             return _call;
130         }
131         catch (java.lang.Throwable JavaDoc t) {
132             throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t);
133         }
134     }
135
136     public interop.wsifservice.SingleTag_Type singleTag(interop.wsifservice.SingleTag_Type singleTag) throws java.rmi.RemoteException JavaDoc {
137         if (super.cachedEndpoint == null) {
138             throw new org.apache.axis.NoEndPointException();
139         }
140         org.apache.axis.client.Call _call = createCall();
141         _call.addParameter(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SingleTag"), new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SingleTag"), interop.wsifservice.SingleTag_Type.class, javax.xml.rpc.ParameterMode.IN);
142         _call.setReturnType(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SingleTag"), interop.wsifservice.SingleTag_Type.class);
143         _call.setUseSOAPAction(true);
144         _call.setSOAPActionURI("http://soapinterop.org/SingleTag");
145         _call.setEncodingStyle(null);
146         _call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
147         _call.setScopedProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
148         _call.setOperationStyle("wrapped");
149         _call.setOperationName(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SingleTag"));
150         _call.setReturnQName(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SingleTag"));
151
152         java.lang.Object JavaDoc _resp = _call.invoke(new java.lang.Object JavaDoc[] {singleTag});
153
154         if (_resp instanceof java.rmi.RemoteException JavaDoc) {
155             throw (java.rmi.RemoteException JavaDoc)_resp;
156         }
157         else {
158             try {
159                 return (interop.wsifservice.SingleTag_Type) _resp;
160             } catch (java.lang.Exception JavaDoc _exception) {
161                 return (interop.wsifservice.SingleTag_Type) org.apache.axis.utils.JavaUtils.convert(_resp, interop.wsifservice.SingleTag_Type.class);
162             }
163         }
164     }
165
166     public interop.wsifservice.SimpleDocument_Type simpleDocument(interop.wsifservice.SimpleDocument_Type simpleDocument) throws java.rmi.RemoteException JavaDoc {
167         if (super.cachedEndpoint == null) {
168             throw new org.apache.axis.NoEndPointException();
169         }
170         org.apache.axis.client.Call _call = createCall();
171         _call.addParameter(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SimpleDocument"), new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SimpleDocument"), interop.wsifservice.SimpleDocument_Type.class, javax.xml.rpc.ParameterMode.IN);
172         _call.setReturnType(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SimpleDocument"), interop.wsifservice.SimpleDocument_Type.class);
173         _call.setUseSOAPAction(true);
174         _call.setSOAPActionURI("http://soapinterop.org/SimpleDocument");
175         _call.setEncodingStyle(null);
176         _call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
177         _call.setScopedProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
178         _call.setOperationStyle("wrapped");
179         _call.setOperationName(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SimpleDocument"));
180         _call.setReturnQName(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "SimpleDocument"));
181
182         java.lang.Object JavaDoc _resp = _call.invoke(new java.lang.Object JavaDoc[] {simpleDocument});
183
184         if (_resp instanceof java.rmi.RemoteException JavaDoc) {
185             throw (java.rmi.RemoteException JavaDoc)_resp;
186         }
187         else {
188             try {
189                 return (interop.wsifservice.SimpleDocument_Type) _resp;
190             } catch (java.lang.Exception JavaDoc _exception) {
191                 return (interop.wsifservice.SimpleDocument_Type) org.apache.axis.utils.JavaUtils.convert(_resp, interop.wsifservice.SimpleDocument_Type.class);
192             }
193         }
194     }
195
196     public interop.wsifservice.ComplexDocument_Type complexDocument(interop.wsifservice.ComplexDocument_Type complexDocument) throws java.rmi.RemoteException JavaDoc {
197         if (super.cachedEndpoint == null) {
198             throw new org.apache.axis.NoEndPointException();
199         }
200         org.apache.axis.client.Call _call = createCall();
201         _call.addParameter(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "ComplexDocument"), new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "ComplexDocument"), interop.wsifservice.ComplexDocument_Type.class, javax.xml.rpc.ParameterMode.IN);
202         _call.setReturnType(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "ComplexDocument"), interop.wsifservice.ComplexDocument_Type.class);
203         _call.setUseSOAPAction(true);
204         _call.setSOAPActionURI("http://soapinterop.org/ComplexDocument");
205         _call.setEncodingStyle(null);
206         _call.setScopedProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
207         _call.setScopedProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
208         _call.setOperationStyle("wrapped");
209         _call.setOperationName(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "ComplexDocument"));
210         _call.setReturnQName(new javax.xml.namespace.QName JavaDoc("http://soapinterop.org/", "ComplexDocument"));
211
212         java.lang.Object JavaDoc _resp = _call.invoke(new java.lang.Object JavaDoc[] {complexDocument});
213
214         if (_resp instanceof java.rmi.RemoteException JavaDoc) {
215             throw (java.rmi.RemoteException JavaDoc)_resp;
216         }
217         else {
218             try {
219                 return (interop.wsifservice.ComplexDocument_Type) _resp;
220             } catch (java.lang.Exception JavaDoc _exception) {
221                 return (interop.wsifservice.ComplexDocument_Type) org.apache.axis.utils.JavaUtils.convert(_resp, interop.wsifservice.ComplexDocument_Type.class);
222             }
223         }
224     }
225
226 }
227
Popular Tags