View Javadoc

1   /**
2    * Win32UtilsPortBindingStub.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
6    */
7   
8   package org.sirius.client.win32.utils;
9   
10  public class Win32UtilsPortBindingStub extends org.apache.axis.client.Stub
11          implements org.sirius.client.win32.utils.Win32Utils {
12      private java.util.Vector                           cachedSerClasses     = new java.util.Vector();
13      private java.util.Vector                           cachedSerQNames      = new java.util.Vector();
14      private java.util.Vector                           cachedSerFactories   = new java.util.Vector();
15      private java.util.Vector                           cachedDeserFactories = new java.util.Vector();
16  
17      static org.apache.axis.description.OperationDesc[] _operations;
18  
19      static {
20          _operations = new org.apache.axis.description.OperationDesc[2];
21          _initOperationDesc1();
22      }
23  
24      private static void _initOperationDesc1() {
25          org.apache.axis.description.OperationDesc oper;
26          org.apache.axis.description.ParameterDesc param;
27          oper = new org.apache.axis.description.OperationDesc();
28          oper.setName("searchWindow");
29          param = new org.apache.axis.description.ParameterDesc(
30                  new javax.xml.namespace.QName("", "arg0"),
31                  org.apache.axis.description.ParameterDesc.IN,
32                  new javax.xml.namespace.QName(
33                          "http://win32.server.sirius.org/", "win32Locator"),
34                  org.sirius.client.win32.types.Win32Locator.class, false, false);
35          param.setOmittable(true);
36          oper.addParameter(param);
37          oper.setReturnType(new javax.xml.namespace.QName(
38                  "http://www.w3.org/2001/XMLSchema", "long"));
39          oper.setReturnClass(long.class);
40          oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
41          oper.setStyle(org.apache.axis.constants.Style.WRAPPED);
42          oper.setUse(org.apache.axis.constants.Use.LITERAL);
43          _operations[0] = oper;
44  
45          oper = new org.apache.axis.description.OperationDesc();
46          oper.setName("searchSameThreadWindow");
47          param = new org.apache.axis.description.ParameterDesc(
48                  new javax.xml.namespace.QName("", "arg0"),
49                  org.apache.axis.description.ParameterDesc.IN,
50                  new javax.xml.namespace.QName(
51                          "http://www.w3.org/2001/XMLSchema", "long"),
52                  long.class, false, false);
53          oper.addParameter(param);
54          param = new org.apache.axis.description.ParameterDesc(
55                  new javax.xml.namespace.QName("", "arg1"),
56                  org.apache.axis.description.ParameterDesc.IN,
57                  new javax.xml.namespace.QName(
58                          "http://win32.server.sirius.org/", "win32Locator"),
59                  org.sirius.client.win32.types.Win32Locator.class, false, false);
60          param.setOmittable(true);
61          oper.addParameter(param);
62          oper.setReturnType(new javax.xml.namespace.QName(
63                  "http://www.w3.org/2001/XMLSchema", "long"));
64          oper.setReturnClass(long.class);
65          oper.setReturnQName(new javax.xml.namespace.QName("", "return"));
66          oper.setStyle(org.apache.axis.constants.Style.WRAPPED);
67          oper.setUse(org.apache.axis.constants.Use.LITERAL);
68          _operations[1] = oper;
69  
70      }
71  
72      public Win32UtilsPortBindingStub() throws org.apache.axis.AxisFault {
73          this(null);
74      }
75  
76      public Win32UtilsPortBindingStub(java.net.URL endpointURL,
77              javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
78          this(service);
79          super.cachedEndpoint = endpointURL;
80      }
81  
82      public Win32UtilsPortBindingStub(javax.xml.rpc.Service service)
83              throws org.apache.axis.AxisFault {
84          if (service == null) {
85              super.service = new org.apache.axis.client.Service();
86          } else {
87              super.service = service;
88          }
89          ((org.apache.axis.client.Service) super.service)
90                  .setTypeMappingVersion("1.2");
91          java.lang.Class cls;
92          javax.xml.namespace.QName qName;
93          javax.xml.namespace.QName qName2;
94          java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
95          java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
96          java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
97          java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
98          java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
99          java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
100         java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
101         java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
102         java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
103         java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
104         qName = new javax.xml.namespace.QName(
105                 "http://win32.server.sirius.org/", "win32Locator");
106         cachedSerQNames.add(qName);
107         cls = org.sirius.client.win32.types.Win32Locator.class;
108         cachedSerClasses.add(cls);
109         cachedSerFactories.add(beansf);
110         cachedDeserFactories.add(beandf);
111 
112     }
113 
114     protected org.apache.axis.client.Call createCall()
115             throws java.rmi.RemoteException {
116         try {
117             org.apache.axis.client.Call _call = super._createCall();
118             if (super.maintainSessionSet) {
119                 _call.setMaintainSession(super.maintainSession);
120             }
121             if (super.cachedUsername != null) {
122                 _call.setUsername(super.cachedUsername);
123             }
124             if (super.cachedPassword != null) {
125                 _call.setPassword(super.cachedPassword);
126             }
127             if (super.cachedEndpoint != null) {
128                 _call.setTargetEndpointAddress(super.cachedEndpoint);
129             }
130             if (super.cachedTimeout != null) {
131                 _call.setTimeout(super.cachedTimeout);
132             }
133             if (super.cachedPortName != null) {
134                 _call.setPortName(super.cachedPortName);
135             }
136             java.util.Enumeration keys = super.cachedProperties.keys();
137             while (keys.hasMoreElements()) {
138                 java.lang.String key = (java.lang.String) keys.nextElement();
139                 _call.setProperty(key, super.cachedProperties.get(key));
140             }
141             // All the type mapping information is registered
142             // when the first call is made.
143             // The type mapping information is actually registered in
144             // the TypeMappingRegistry of the service, which
145             // is the reason why registration is only needed for the first call.
146             synchronized (this) {
147                 if (firstCall()) {
148                     // must set encoding style before registering serializers
149                     _call.setEncodingStyle(null);
150                     for (int i = 0; i < cachedSerFactories.size(); ++i) {
151                         java.lang.Class cls = (java.lang.Class) cachedSerClasses
152                                 .get(i);
153                         javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames
154                                 .get(i);
155                         java.lang.Object x = cachedSerFactories.get(i);
156                         if (x instanceof Class) {
157                             java.lang.Class sf = (java.lang.Class) cachedSerFactories
158                                     .get(i);
159                             java.lang.Class df = (java.lang.Class) cachedDeserFactories
160                                     .get(i);
161                             _call.registerTypeMapping(cls, qName, sf, df, false);
162                         } else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
163                             org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory) cachedSerFactories
164                                     .get(i);
165                             org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory) cachedDeserFactories
166                                     .get(i);
167                             _call.registerTypeMapping(cls, qName, sf, df, false);
168                         }
169                     }
170                 }
171             }
172             return _call;
173         } catch (java.lang.Throwable _t) {
174             throw new org.apache.axis.AxisFault(
175                     "Failure trying to get the Call object", _t);
176         }
177     }
178 
179     public long searchWindow(org.sirius.client.win32.types.Win32Locator arg0)
180             throws java.rmi.RemoteException {
181         if (super.cachedEndpoint == null) {
182             throw new org.apache.axis.NoEndPointException();
183         }
184         org.apache.axis.client.Call _call = createCall();
185         _call.setOperation(_operations[0]);
186         _call.setUseSOAPAction(true);
187         _call.setSOAPActionURI("");
188         _call.setEncodingStyle(null);
189         _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR,
190                 Boolean.FALSE);
191         _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,
192                 Boolean.FALSE);
193         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
194         _call.setOperationName(new javax.xml.namespace.QName(
195                 "http://win32.server.sirius.org/", "searchWindow"));
196 
197         setRequestHeaders(_call);
198         setAttachments(_call);
199         try {
200             java.lang.Object _resp = _call
201                     .invoke(new java.lang.Object[] { arg0 });
202 
203             if (_resp instanceof java.rmi.RemoteException) {
204                 throw (java.rmi.RemoteException) _resp;
205             } else {
206                 extractAttachments(_call);
207                 try {
208                     return ((java.lang.Long) _resp).longValue();
209                 } catch (java.lang.Exception _exception) {
210                     return ((java.lang.Long) org.apache.axis.utils.JavaUtils
211                             .convert(_resp, long.class)).longValue();
212                 }
213             }
214         } catch (org.apache.axis.AxisFault axisFaultException) {
215             throw axisFaultException;
216         }
217     }
218 
219     public long searchSameThreadWindow(long arg0,
220             org.sirius.client.win32.types.Win32Locator arg1)
221             throws java.rmi.RemoteException {
222         if (super.cachedEndpoint == null) {
223             throw new org.apache.axis.NoEndPointException();
224         }
225         org.apache.axis.client.Call _call = createCall();
226         _call.setOperation(_operations[1]);
227         _call.setUseSOAPAction(true);
228         _call.setSOAPActionURI("");
229         _call.setEncodingStyle(null);
230         _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR,
231                 Boolean.FALSE);
232         _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,
233                 Boolean.FALSE);
234         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
235         _call.setOperationName(new javax.xml.namespace.QName(
236                 "http://win32.server.sirius.org/", "searchSameThreadWindow"));
237 
238         setRequestHeaders(_call);
239         setAttachments(_call);
240         try {
241             java.lang.Object _resp = _call.invoke(new java.lang.Object[] {
242                     new java.lang.Long(arg0), arg1 });
243 
244             if (_resp instanceof java.rmi.RemoteException) {
245                 throw (java.rmi.RemoteException) _resp;
246             } else {
247                 extractAttachments(_call);
248                 try {
249                     return ((java.lang.Long) _resp).longValue();
250                 } catch (java.lang.Exception _exception) {
251                     return ((java.lang.Long) org.apache.axis.utils.JavaUtils
252                             .convert(_resp, long.class)).longValue();
253                 }
254             }
255         } catch (org.apache.axis.AxisFault axisFaultException) {
256             throw axisFaultException;
257         }
258     }
259 
260 }