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