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