View Javadoc
1   /*
2    * Copyright (c) 2002-2017, Mairie de Paris
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions
7    * are met:
8    *
9    *  1. Redistributions of source code must retain the above copyright notice
10   *     and the following disclaimer.
11   *
12   *  2. Redistributions in binary form must reproduce the above copyright notice
13   *     and the following disclaimer in the documentation and/or other materials
14   *     provided with the distribution.
15   *
16   *  3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17   *     contributors may be used to endorse or promote products derived from
18   *     this software without specific prior written permission.
19   *
20   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23   * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24   * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27   * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30   * POSSIBILITY OF SUCH DAMAGE.
31   *
32   * License 1.0
33   */
34  /**
35   * UserServiceSoapBindingStub.java
36   *
37   * This file was auto-generated from WSDL
38   * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
39   */
40  
41  package com.tvnavig.server.user;
42  
43  public class UserServiceSoapBindingStub extends org.apache.axis.client.Stub implements com.tvnavig.server.user.UserService {
44      private java.util.Vector cachedSerClasses = new java.util.Vector();
45      private java.util.Vector cachedSerQNames = new java.util.Vector();
46      private java.util.Vector cachedSerFactories = new java.util.Vector();
47      private java.util.Vector cachedDeserFactories = new java.util.Vector();
48  
49      static org.apache.axis.description.OperationDesc [] _operations;
50  
51      static {
52          _operations = new org.apache.axis.description.OperationDesc[4];
53          _initOperationDesc1();
54      }
55  
56      private static void _initOperationDesc1(){
57          org.apache.axis.description.OperationDesc oper;
58          org.apache.axis.description.ParameterDesc param;
59          oper = new org.apache.axis.description.OperationDesc();
60          oper.setName("isAlive");
61          oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
62          oper.setStyle(org.apache.axis.constants.Style.RPC);
63          oper.setUse(org.apache.axis.constants.Use.ENCODED);
64          _operations[0] = oper;
65  
66          oper = new org.apache.axis.description.OperationDesc();
67          oper.setName("authenticate");
68          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "login"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
69          oper.addParameter(param);
70          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "password"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
71          oper.addParameter(param);
72          oper.setReturnType(new javax.xml.namespace.QName("http://common.service.user.server.tvnavig.com", "UserServiceResult"));
73          oper.setReturnClass(com.tvnavig.server.user.service.common.UserServiceResult.class);
74          oper.setReturnQName(new javax.xml.namespace.QName("", "authenticateReturn"));
75          oper.setStyle(org.apache.axis.constants.Style.RPC);
76          oper.setUse(org.apache.axis.constants.Use.ENCODED);
77          oper.addFault(new org.apache.axis.description.FaultDesc(
78                        new javax.xml.namespace.QName("http://user.server.tvnavig.com", "fault"),
79                        "com.tvnavig.server.user.UserServiceException",
80                        new javax.xml.namespace.QName("http://user.server.tvnavig.com", "UserServiceException"), 
81                        true
82                       ));
83          _operations[1] = oper;
84  
85          oper = new org.apache.axis.description.OperationDesc();
86          oper.setName("getDomainsFromUser");
87          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "userId"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
88          oper.addParameter(param);
89          oper.setReturnType(new javax.xml.namespace.QName("http://user.server.tvnavig.com", "ArrayOf_tns1_UserDomainResult"));
90          oper.setReturnClass(com.tvnavig.server.user.service.common.UserDomainResult[].class);
91          oper.setReturnQName(new javax.xml.namespace.QName("", "getDomainsFromUserReturn"));
92          oper.setStyle(org.apache.axis.constants.Style.RPC);
93          oper.setUse(org.apache.axis.constants.Use.ENCODED);
94          oper.addFault(new org.apache.axis.description.FaultDesc(
95                        new javax.xml.namespace.QName("http://user.server.tvnavig.com", "fault"),
96                        "com.tvnavig.server.user.UserServiceException",
97                        new javax.xml.namespace.QName("http://user.server.tvnavig.com", "UserServiceException"), 
98                        true
99                       ));
100         _operations[2] = oper;
101 
102         oper = new org.apache.axis.description.OperationDesc();
103         oper.setName("getGroupsandMetaDatasFromDomain");
104         param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "domainId"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
105         oper.addParameter(param);
106         oper.setReturnType(new javax.xml.namespace.QName("http://common.service.user.server.tvnavig.com", "UserGroupandMetaDataResult"));
107         oper.setReturnClass(com.tvnavig.server.user.service.common.UserGroupandMetaDataResult.class);
108         oper.setReturnQName(new javax.xml.namespace.QName("", "getGroupsandMetaDatasFromDomainReturn"));
109         oper.setStyle(org.apache.axis.constants.Style.RPC);
110         oper.setUse(org.apache.axis.constants.Use.ENCODED);
111         oper.addFault(new org.apache.axis.description.FaultDesc(
112                       new javax.xml.namespace.QName("http://user.server.tvnavig.com", "fault"),
113                       "com.tvnavig.server.user.UserServiceException",
114                       new javax.xml.namespace.QName("http://user.server.tvnavig.com", "UserServiceException"), 
115                       true
116                      ));
117         _operations[3] = oper;
118 
119     }
120 
121     public UserServiceSoapBindingStub() throws org.apache.axis.AxisFault {
122          this(null);
123     }
124 
125     public UserServiceSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
126          this(service);
127          super.cachedEndpoint = endpointURL;
128     }
129 
130     public UserServiceSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
131         if (service == null) {
132             super.service = new org.apache.axis.client.Service();
133         } else {
134             super.service = service;
135         }
136         ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
137             java.lang.Class cls;
138             javax.xml.namespace.QName qName;
139             javax.xml.namespace.QName qName2;
140             java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
141             java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
142             java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
143             java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
144             java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
145             java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
146             java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
147             java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
148             java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
149             java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
150             qName = new javax.xml.namespace.QName("http://common.service.user.server.tvnavig.com", "MetaDataResult");
151             cachedSerQNames.add(qName);
152             cls = com.tvnavig.server.user.service.common.MetaDataResult.class;
153             cachedSerClasses.add(cls);
154             cachedSerFactories.add(beansf);
155             cachedDeserFactories.add(beandf);
156 
157             qName = new javax.xml.namespace.QName("http://common.service.user.server.tvnavig.com", "UserDomainResult");
158             cachedSerQNames.add(qName);
159             cls = com.tvnavig.server.user.service.common.UserDomainResult.class;
160             cachedSerClasses.add(cls);
161             cachedSerFactories.add(beansf);
162             cachedDeserFactories.add(beandf);
163 
164             qName = new javax.xml.namespace.QName("http://common.service.user.server.tvnavig.com", "UserGroupandMetaDataResult");
165             cachedSerQNames.add(qName);
166             cls = com.tvnavig.server.user.service.common.UserGroupandMetaDataResult.class;
167             cachedSerClasses.add(cls);
168             cachedSerFactories.add(beansf);
169             cachedDeserFactories.add(beandf);
170 
171             qName = new javax.xml.namespace.QName("http://common.service.user.server.tvnavig.com", "UserGroupResult");
172             cachedSerQNames.add(qName);
173             cls = com.tvnavig.server.user.service.common.UserGroupResult.class;
174             cachedSerClasses.add(cls);
175             cachedSerFactories.add(beansf);
176             cachedDeserFactories.add(beandf);
177 
178             qName = new javax.xml.namespace.QName("http://common.service.user.server.tvnavig.com", "UserServiceResult");
179             cachedSerQNames.add(qName);
180             cls = com.tvnavig.server.user.service.common.UserServiceResult.class;
181             cachedSerClasses.add(cls);
182             cachedSerFactories.add(beansf);
183             cachedDeserFactories.add(beandf);
184 
185             qName = new javax.xml.namespace.QName("http://user.server.tvnavig.com", "ArrayOf_tns1_MetaDataResult");
186             cachedSerQNames.add(qName);
187             cls = com.tvnavig.server.user.service.common.MetaDataResult[].class;
188             cachedSerClasses.add(cls);
189             qName = new javax.xml.namespace.QName("http://common.service.user.server.tvnavig.com", "MetaDataResult");
190             qName2 = null;
191             cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
192             cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
193 
194             qName = new javax.xml.namespace.QName("http://user.server.tvnavig.com", "ArrayOf_tns1_UserDomainResult");
195             cachedSerQNames.add(qName);
196             cls = com.tvnavig.server.user.service.common.UserDomainResult[].class;
197             cachedSerClasses.add(cls);
198             qName = new javax.xml.namespace.QName("http://common.service.user.server.tvnavig.com", "UserDomainResult");
199             qName2 = null;
200             cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
201             cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
202 
203             qName = new javax.xml.namespace.QName("http://user.server.tvnavig.com", "ArrayOf_tns1_UserGroupResult");
204             cachedSerQNames.add(qName);
205             cls = com.tvnavig.server.user.service.common.UserGroupResult[].class;
206             cachedSerClasses.add(cls);
207             qName = new javax.xml.namespace.QName("http://common.service.user.server.tvnavig.com", "UserGroupResult");
208             qName2 = null;
209             cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
210             cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
211 
212             qName = new javax.xml.namespace.QName("http://user.server.tvnavig.com", "ArrayOf_xsd_string");
213             cachedSerQNames.add(qName);
214             cls = java.lang.String[].class;
215             cachedSerClasses.add(cls);
216             qName = new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string");
217             qName2 = null;
218             cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
219             cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
220 
221             qName = new javax.xml.namespace.QName("http://user.server.tvnavig.com", "UserServiceException");
222             cachedSerQNames.add(qName);
223             cls = com.tvnavig.server.user.UserServiceException.class;
224             cachedSerClasses.add(cls);
225             cachedSerFactories.add(beansf);
226             cachedDeserFactories.add(beandf);
227 
228             qName = new javax.xml.namespace.QName("http://util.server.tvnavig.com", "ServiceException");
229             cachedSerQNames.add(qName);
230             cls = com.tvnavig.server.util.ServiceException.class;
231             cachedSerClasses.add(cls);
232             cachedSerFactories.add(beansf);
233             cachedDeserFactories.add(beandf);
234 
235     }
236 
237     protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
238         try {
239             org.apache.axis.client.Call _call = super._createCall();
240             if (super.maintainSessionSet) {
241                 _call.setMaintainSession(super.maintainSession);
242             }
243             if (super.cachedUsername != null) {
244                 _call.setUsername(super.cachedUsername);
245             }
246             if (super.cachedPassword != null) {
247                 _call.setPassword(super.cachedPassword);
248             }
249             if (super.cachedEndpoint != null) {
250                 _call.setTargetEndpointAddress(super.cachedEndpoint);
251             }
252             if (super.cachedTimeout != null) {
253                 _call.setTimeout(super.cachedTimeout);
254             }
255             if (super.cachedPortName != null) {
256                 _call.setPortName(super.cachedPortName);
257             }
258             java.util.Enumeration keys = super.cachedProperties.keys();
259             while (keys.hasMoreElements()) {
260                 java.lang.String key = (java.lang.String) keys.nextElement();
261                 _call.setProperty(key, super.cachedProperties.get(key));
262             }
263             // All the type mapping information is registered
264             // when the first call is made.
265             // The type mapping information is actually registered in
266             // the TypeMappingRegistry of the service, which
267             // is the reason why registration is only needed for the first call.
268             synchronized (this) {
269                 if (firstCall()) {
270                     // must set encoding style before registering serializers
271                     _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
272                     _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
273                     for (int i = 0; i < cachedSerFactories.size(); ++i) {
274                         java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
275                         javax.xml.namespace.QName qName =
276                                 (javax.xml.namespace.QName) cachedSerQNames.get(i);
277                         java.lang.Object x = cachedSerFactories.get(i);
278                         if (x instanceof Class) {
279                             java.lang.Class sf = (java.lang.Class)
280                                  cachedSerFactories.get(i);
281                             java.lang.Class df = (java.lang.Class)
282                                  cachedDeserFactories.get(i);
283                             _call.registerTypeMapping(cls, qName, sf, df, false);
284                         }
285                         else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
286                             org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
287                                  cachedSerFactories.get(i);
288                             org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
289                                  cachedDeserFactories.get(i);
290                             _call.registerTypeMapping(cls, qName, sf, df, false);
291                         }
292                     }
293                 }
294             }
295             return _call;
296         }
297         catch (java.lang.Throwable _t) {
298             throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
299         }
300     }
301 
302     public void isAlive() throws java.rmi.RemoteException {
303         if (super.cachedEndpoint == null) {
304             throw new org.apache.axis.NoEndPointException();
305         }
306         org.apache.axis.client.Call _call = createCall();
307         _call.setOperation(_operations[0]);
308         _call.setUseSOAPAction(true);
309         _call.setSOAPActionURI("");
310         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
311         _call.setOperationName(new javax.xml.namespace.QName("http://user.server.tvnavig.com", "isAlive"));
312 
313         setRequestHeaders(_call);
314         setAttachments(_call);
315  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {});
316 
317         if (_resp instanceof java.rmi.RemoteException) {
318             throw (java.rmi.RemoteException)_resp;
319         }
320         extractAttachments(_call);
321   } catch (org.apache.axis.AxisFault axisFaultException) {
322   throw axisFaultException;
323 }
324     }
325 
326     public com.tvnavig.server.user.service.common.UserServiceResult authenticate(java.lang.String login, java.lang.String password) throws java.rmi.RemoteException, com.tvnavig.server.user.UserServiceException {
327         if (super.cachedEndpoint == null) {
328             throw new org.apache.axis.NoEndPointException();
329         }
330         org.apache.axis.client.Call _call = createCall();
331         _call.setOperation(_operations[1]);
332         _call.setUseSOAPAction(true);
333         _call.setSOAPActionURI("");
334         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
335         _call.setOperationName(new javax.xml.namespace.QName("http://user.server.tvnavig.com", "authenticate"));
336 
337         setRequestHeaders(_call);
338         setAttachments(_call);
339  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {login, password});
340 
341         if (_resp instanceof java.rmi.RemoteException) {
342             throw (java.rmi.RemoteException)_resp;
343         }
344         else {
345             extractAttachments(_call);
346             try {
347                 return (com.tvnavig.server.user.service.common.UserServiceResult) _resp;
348             } catch (java.lang.Exception _exception) {
349                 return (com.tvnavig.server.user.service.common.UserServiceResult) org.apache.axis.utils.JavaUtils.convert(_resp, com.tvnavig.server.user.service.common.UserServiceResult.class);
350             }
351         }
352   } catch (org.apache.axis.AxisFault axisFaultException) {
353     if (axisFaultException.detail != null) {
354         if (axisFaultException.detail instanceof java.rmi.RemoteException) {
355               throw (java.rmi.RemoteException) axisFaultException.detail;
356          }
357         if (axisFaultException.detail instanceof com.tvnavig.server.user.UserServiceException) {
358               throw (com.tvnavig.server.user.UserServiceException) axisFaultException.detail;
359          }
360    }
361   throw axisFaultException;
362 }
363     }
364 
365     public com.tvnavig.server.user.service.common.UserDomainResult[] getDomainsFromUser(int userId) throws java.rmi.RemoteException, com.tvnavig.server.user.UserServiceException {
366         if (super.cachedEndpoint == null) {
367             throw new org.apache.axis.NoEndPointException();
368         }
369         org.apache.axis.client.Call _call = createCall();
370         _call.setOperation(_operations[2]);
371         _call.setUseSOAPAction(true);
372         _call.setSOAPActionURI("");
373         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
374         _call.setOperationName(new javax.xml.namespace.QName("http://user.server.tvnavig.com", "getDomainsFromUser"));
375 
376         setRequestHeaders(_call);
377         setAttachments(_call);
378  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(userId)});
379 
380         if (_resp instanceof java.rmi.RemoteException) {
381             throw (java.rmi.RemoteException)_resp;
382         }
383         else {
384             extractAttachments(_call);
385             try {
386                 return (com.tvnavig.server.user.service.common.UserDomainResult[]) _resp;
387             } catch (java.lang.Exception _exception) {
388                 return (com.tvnavig.server.user.service.common.UserDomainResult[]) org.apache.axis.utils.JavaUtils.convert(_resp, com.tvnavig.server.user.service.common.UserDomainResult[].class);
389             }
390         }
391   } catch (org.apache.axis.AxisFault axisFaultException) {
392     if (axisFaultException.detail != null) {
393         if (axisFaultException.detail instanceof java.rmi.RemoteException) {
394               throw (java.rmi.RemoteException) axisFaultException.detail;
395          }
396         if (axisFaultException.detail instanceof com.tvnavig.server.user.UserServiceException) {
397               throw (com.tvnavig.server.user.UserServiceException) axisFaultException.detail;
398          }
399    }
400   throw axisFaultException;
401 }
402     }
403 
404     public com.tvnavig.server.user.service.common.UserGroupandMetaDataResult getGroupsandMetaDatasFromDomain(int domainId) throws java.rmi.RemoteException, com.tvnavig.server.user.UserServiceException {
405         if (super.cachedEndpoint == null) {
406             throw new org.apache.axis.NoEndPointException();
407         }
408         org.apache.axis.client.Call _call = createCall();
409         _call.setOperation(_operations[3]);
410         _call.setUseSOAPAction(true);
411         _call.setSOAPActionURI("");
412         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
413         _call.setOperationName(new javax.xml.namespace.QName("http://user.server.tvnavig.com", "getGroupsandMetaDatasFromDomain"));
414 
415         setRequestHeaders(_call);
416         setAttachments(_call);
417  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(domainId)});
418 
419         if (_resp instanceof java.rmi.RemoteException) {
420             throw (java.rmi.RemoteException)_resp;
421         }
422         else {
423             extractAttachments(_call);
424             try {
425                 return (com.tvnavig.server.user.service.common.UserGroupandMetaDataResult) _resp;
426             } catch (java.lang.Exception _exception) {
427                 return (com.tvnavig.server.user.service.common.UserGroupandMetaDataResult) org.apache.axis.utils.JavaUtils.convert(_resp, com.tvnavig.server.user.service.common.UserGroupandMetaDataResult.class);
428             }
429         }
430   } catch (org.apache.axis.AxisFault axisFaultException) {
431     if (axisFaultException.detail != null) {
432         if (axisFaultException.detail instanceof java.rmi.RemoteException) {
433               throw (java.rmi.RemoteException) axisFaultException.detail;
434          }
435         if (axisFaultException.detail instanceof com.tvnavig.server.user.UserServiceException) {
436               throw (com.tvnavig.server.user.UserServiceException) axisFaultException.detail;
437          }
438    }
439   throw axisFaultException;
440 }
441     }
442 
443 }