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