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