1   /**
2    * Portal_RegionServiceSoapBindingStub.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 com.liferay.client.portal.service.http;
9   
10  public class Portal_RegionServiceSoapBindingStub extends org.apache.axis.client.Stub implements com.liferay.client.portal.service.http.RegionServiceSoap {
11      private java.util.Vector cachedSerClasses = new java.util.Vector();
12      private java.util.Vector cachedSerQNames = new java.util.Vector();
13      private java.util.Vector cachedSerFactories = new java.util.Vector();
14      private java.util.Vector cachedDeserFactories = new java.util.Vector();
15  
16      static org.apache.axis.description.OperationDesc [] _operations;
17  
18      static {
19          _operations = new org.apache.axis.description.OperationDesc[5];
20          _initOperationDesc1();
21      }
22  
23      private static void _initOperationDesc1(){
24          org.apache.axis.description.OperationDesc oper;
25          org.apache.axis.description.ParameterDesc param;
26          oper = new org.apache.axis.description.OperationDesc();
27          oper.setName("getRegions");
28          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "countryId"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"), long.class, false, false);
29          oper.addParameter(param);
30          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "active"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, false, false);
31          oper.addParameter(param);
32          oper.setReturnType(new javax.xml.namespace.QName("urn:http.service.portal.liferay.com", "ArrayOf_tns2_RegionSoap"));
33          oper.setReturnClass(com.liferay.client.portal.model.RegionSoap[].class);
34          oper.setReturnQName(new javax.xml.namespace.QName("", "getRegionsReturn"));
35          oper.setStyle(org.apache.axis.constants.Style.RPC);
36          oper.setUse(org.apache.axis.constants.Use.ENCODED);
37          _operations[0] = oper;
38  
39          oper = new org.apache.axis.description.OperationDesc();
40          oper.setName("getRegions");
41          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "active"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, false, false);
42          oper.addParameter(param);
43          oper.setReturnType(new javax.xml.namespace.QName("urn:http.service.portal.liferay.com", "ArrayOf_tns2_RegionSoap"));
44          oper.setReturnClass(com.liferay.client.portal.model.RegionSoap[].class);
45          oper.setReturnQName(new javax.xml.namespace.QName("", "getRegionsReturn"));
46          oper.setStyle(org.apache.axis.constants.Style.RPC);
47          oper.setUse(org.apache.axis.constants.Use.ENCODED);
48          _operations[1] = oper;
49  
50          oper = new org.apache.axis.description.OperationDesc();
51          oper.setName("getRegions");
52          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "countryId"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"), long.class, false, false);
53          oper.addParameter(param);
54          oper.setReturnType(new javax.xml.namespace.QName("urn:http.service.portal.liferay.com", "ArrayOf_tns2_RegionSoap"));
55          oper.setReturnClass(com.liferay.client.portal.model.RegionSoap[].class);
56          oper.setReturnQName(new javax.xml.namespace.QName("", "getRegionsReturn"));
57          oper.setStyle(org.apache.axis.constants.Style.RPC);
58          oper.setUse(org.apache.axis.constants.Use.ENCODED);
59          _operations[2] = oper;
60  
61          oper = new org.apache.axis.description.OperationDesc();
62          oper.setName("getRegions");
63          oper.setReturnType(new javax.xml.namespace.QName("urn:http.service.portal.liferay.com", "ArrayOf_tns2_RegionSoap"));
64          oper.setReturnClass(com.liferay.client.portal.model.RegionSoap[].class);
65          oper.setReturnQName(new javax.xml.namespace.QName("", "getRegionsReturn"));
66          oper.setStyle(org.apache.axis.constants.Style.RPC);
67          oper.setUse(org.apache.axis.constants.Use.ENCODED);
68          _operations[3] = oper;
69  
70          oper = new org.apache.axis.description.OperationDesc();
71          oper.setName("getRegion");
72          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "regionId"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"), long.class, false, false);
73          oper.addParameter(param);
74          oper.setReturnType(new javax.xml.namespace.QName("http://model.portal.liferay.com", "RegionSoap"));
75          oper.setReturnClass(com.liferay.client.portal.model.RegionSoap.class);
76          oper.setReturnQName(new javax.xml.namespace.QName("", "getRegionReturn"));
77          oper.setStyle(org.apache.axis.constants.Style.RPC);
78          oper.setUse(org.apache.axis.constants.Use.ENCODED);
79          _operations[4] = oper;
80  
81      }
82  
83      public Portal_RegionServiceSoapBindingStub() throws org.apache.axis.AxisFault {
84           this(null);
85      }
86  
87      public Portal_RegionServiceSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
88           this(service);
89           super.cachedEndpoint = endpointURL;
90      }
91  
92      public Portal_RegionServiceSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
93          if (service == null) {
94              super.service = new org.apache.axis.client.Service();
95          } else {
96              super.service = service;
97          }
98          ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
99              java.lang.Class cls;
100             javax.xml.namespace.QName qName;
101             javax.xml.namespace.QName qName2;
102             java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
103             java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
104             java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
105             java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
106             java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
107             java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
108             java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
109             java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
110             java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
111             java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
112             qName = new javax.xml.namespace.QName("http://model.portal.liferay.com", "RegionSoap");
113             cachedSerQNames.add(qName);
114             cls = com.liferay.client.portal.model.RegionSoap.class;
115             cachedSerClasses.add(cls);
116             cachedSerFactories.add(beansf);
117             cachedDeserFactories.add(beandf);
118 
119             qName = new javax.xml.namespace.QName("urn:http.service.portal.liferay.com", "ArrayOf_tns2_RegionSoap");
120             cachedSerQNames.add(qName);
121             cls = com.liferay.client.portal.model.RegionSoap[].class;
122             cachedSerClasses.add(cls);
123             qName = new javax.xml.namespace.QName("http://model.portal.liferay.com", "RegionSoap");
124             qName2 = null;
125             cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
126             cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
127 
128     }
129 
130     protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
131         try {
132             org.apache.axis.client.Call _call = super._createCall();
133             if (super.maintainSessionSet) {
134                 _call.setMaintainSession(super.maintainSession);
135             }
136             if (super.cachedUsername != null) {
137                 _call.setUsername(super.cachedUsername);
138             }
139             if (super.cachedPassword != null) {
140                 _call.setPassword(super.cachedPassword);
141             }
142             if (super.cachedEndpoint != null) {
143                 _call.setTargetEndpointAddress(super.cachedEndpoint);
144             }
145             if (super.cachedTimeout != null) {
146                 _call.setTimeout(super.cachedTimeout);
147             }
148             if (super.cachedPortName != null) {
149                 _call.setPortName(super.cachedPortName);
150             }
151             java.util.Enumeration keys = super.cachedProperties.keys();
152             while (keys.hasMoreElements()) {
153                 java.lang.String key = (java.lang.String) keys.nextElement();
154                 _call.setProperty(key, super.cachedProperties.get(key));
155             }
156             // All the type mapping information is registered
157             // when the first call is made.
158             // The type mapping information is actually registered in
159             // the TypeMappingRegistry of the service, which
160             // is the reason why registration is only needed for the first call.
161             synchronized (this) {
162                 if (firstCall()) {
163                     // must set encoding style before registering serializers
164                     _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
165                     _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
166                     for (int i = 0; i < cachedSerFactories.size(); ++i) {
167                         java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
168                         javax.xml.namespace.QName qName =
169                                 (javax.xml.namespace.QName) cachedSerQNames.get(i);
170                         java.lang.Object x = cachedSerFactories.get(i);
171                         if (x instanceof Class) {
172                             java.lang.Class sf = (java.lang.Class)
173                                  cachedSerFactories.get(i);
174                             java.lang.Class df = (java.lang.Class)
175                                  cachedDeserFactories.get(i);
176                             _call.registerTypeMapping(cls, qName, sf, df, false);
177                         }
178                         else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
179                             org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
180                                  cachedSerFactories.get(i);
181                             org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
182                                  cachedDeserFactories.get(i);
183                             _call.registerTypeMapping(cls, qName, sf, df, false);
184                         }
185                     }
186                 }
187             }
188             return _call;
189         }
190         catch (java.lang.Throwable _t) {
191             throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
192         }
193     }
194 
195     public com.liferay.client.portal.model.RegionSoap[] getRegions(long countryId, boolean active) throws java.rmi.RemoteException {
196         if (super.cachedEndpoint == null) {
197             throw new org.apache.axis.NoEndPointException();
198         }
199         org.apache.axis.client.Call _call = createCall();
200         _call.setOperation(_operations[0]);
201         _call.setUseSOAPAction(true);
202         _call.setSOAPActionURI("");
203         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
204         _call.setOperationName(new javax.xml.namespace.QName("urn:http.service.portal.liferay.com", "getRegions"));
205 
206         setRequestHeaders(_call);
207         setAttachments(_call);
208  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(countryId), new java.lang.Boolean(active)});
209 
210         if (_resp instanceof java.rmi.RemoteException) {
211             throw (java.rmi.RemoteException)_resp;
212         }
213         else {
214             extractAttachments(_call);
215             try {
216                 return (com.liferay.client.portal.model.RegionSoap[]) _resp;
217             } catch (java.lang.Exception _exception) {
218                 return (com.liferay.client.portal.model.RegionSoap[]) org.apache.axis.utils.JavaUtils.convert(_resp, com.liferay.client.portal.model.RegionSoap[].class);
219             }
220         }
221   } catch (org.apache.axis.AxisFault axisFaultException) {
222   throw axisFaultException;
223 }
224     }
225 
226     public com.liferay.client.portal.model.RegionSoap[] getRegions(boolean active) throws java.rmi.RemoteException {
227         if (super.cachedEndpoint == null) {
228             throw new org.apache.axis.NoEndPointException();
229         }
230         org.apache.axis.client.Call _call = createCall();
231         _call.setOperation(_operations[1]);
232         _call.setUseSOAPAction(true);
233         _call.setSOAPActionURI("");
234         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
235         _call.setOperationName(new javax.xml.namespace.QName("urn:http.service.portal.liferay.com", "getRegions"));
236 
237         setRequestHeaders(_call);
238         setAttachments(_call);
239  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Boolean(active)});
240 
241         if (_resp instanceof java.rmi.RemoteException) {
242             throw (java.rmi.RemoteException)_resp;
243         }
244         else {
245             extractAttachments(_call);
246             try {
247                 return (com.liferay.client.portal.model.RegionSoap[]) _resp;
248             } catch (java.lang.Exception _exception) {
249                 return (com.liferay.client.portal.model.RegionSoap[]) org.apache.axis.utils.JavaUtils.convert(_resp, com.liferay.client.portal.model.RegionSoap[].class);
250             }
251         }
252   } catch (org.apache.axis.AxisFault axisFaultException) {
253   throw axisFaultException;
254 }
255     }
256 
257     public com.liferay.client.portal.model.RegionSoap[] getRegions(long countryId) throws java.rmi.RemoteException {
258         if (super.cachedEndpoint == null) {
259             throw new org.apache.axis.NoEndPointException();
260         }
261         org.apache.axis.client.Call _call = createCall();
262         _call.setOperation(_operations[2]);
263         _call.setUseSOAPAction(true);
264         _call.setSOAPActionURI("");
265         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
266         _call.setOperationName(new javax.xml.namespace.QName("urn:http.service.portal.liferay.com", "getRegions"));
267 
268         setRequestHeaders(_call);
269         setAttachments(_call);
270  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(countryId)});
271 
272         if (_resp instanceof java.rmi.RemoteException) {
273             throw (java.rmi.RemoteException)_resp;
274         }
275         else {
276             extractAttachments(_call);
277             try {
278                 return (com.liferay.client.portal.model.RegionSoap[]) _resp;
279             } catch (java.lang.Exception _exception) {
280                 return (com.liferay.client.portal.model.RegionSoap[]) org.apache.axis.utils.JavaUtils.convert(_resp, com.liferay.client.portal.model.RegionSoap[].class);
281             }
282         }
283   } catch (org.apache.axis.AxisFault axisFaultException) {
284   throw axisFaultException;
285 }
286     }
287 
288     public com.liferay.client.portal.model.RegionSoap[] getRegions() throws java.rmi.RemoteException {
289         if (super.cachedEndpoint == null) {
290             throw new org.apache.axis.NoEndPointException();
291         }
292         org.apache.axis.client.Call _call = createCall();
293         _call.setOperation(_operations[3]);
294         _call.setUseSOAPAction(true);
295         _call.setSOAPActionURI("");
296         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
297         _call.setOperationName(new javax.xml.namespace.QName("urn:http.service.portal.liferay.com", "getRegions"));
298 
299         setRequestHeaders(_call);
300         setAttachments(_call);
301  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {});
302 
303         if (_resp instanceof java.rmi.RemoteException) {
304             throw (java.rmi.RemoteException)_resp;
305         }
306         else {
307             extractAttachments(_call);
308             try {
309                 return (com.liferay.client.portal.model.RegionSoap[]) _resp;
310             } catch (java.lang.Exception _exception) {
311                 return (com.liferay.client.portal.model.RegionSoap[]) org.apache.axis.utils.JavaUtils.convert(_resp, com.liferay.client.portal.model.RegionSoap[].class);
312             }
313         }
314   } catch (org.apache.axis.AxisFault axisFaultException) {
315   throw axisFaultException;
316 }
317     }
318 
319     public com.liferay.client.portal.model.RegionSoap getRegion(long regionId) throws java.rmi.RemoteException {
320         if (super.cachedEndpoint == null) {
321             throw new org.apache.axis.NoEndPointException();
322         }
323         org.apache.axis.client.Call _call = createCall();
324         _call.setOperation(_operations[4]);
325         _call.setUseSOAPAction(true);
326         _call.setSOAPActionURI("");
327         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
328         _call.setOperationName(new javax.xml.namespace.QName("urn:http.service.portal.liferay.com", "getRegion"));
329 
330         setRequestHeaders(_call);
331         setAttachments(_call);
332  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(regionId)});
333 
334         if (_resp instanceof java.rmi.RemoteException) {
335             throw (java.rmi.RemoteException)_resp;
336         }
337         else {
338             extractAttachments(_call);
339             try {
340                 return (com.liferay.client.portal.model.RegionSoap) _resp;
341             } catch (java.lang.Exception _exception) {
342                 return (com.liferay.client.portal.model.RegionSoap) org.apache.axis.utils.JavaUtils.convert(_resp, com.liferay.client.portal.model.RegionSoap.class);
343             }
344         }
345   } catch (org.apache.axis.AxisFault axisFaultException) {
346   throw axisFaultException;
347 }
348     }
349 
350 }
351