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_string");
103             cachedSerQNames.add(qName);
104             cls = java.lang.String[].class;
105             cachedSerClasses.add(cls);
106             qName = new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string");
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     }
112 
113     protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
114         try {
115             org.apache.axis.client.Call _call = super._createCall();
116             if (super.maintainSessionSet) {
117                 _call.setMaintainSession(super.maintainSession);
118             }
119             if (super.cachedUsername != null) {
120                 _call.setUsername(super.cachedUsername);
121             }
122             if (super.cachedPassword != null) {
123                 _call.setPassword(super.cachedPassword);
124             }
125             if (super.cachedEndpoint != null) {
126                 _call.setTargetEndpointAddress(super.cachedEndpoint);
127             }
128             if (super.cachedTimeout != null) {
129                 _call.setTimeout(super.cachedTimeout);
130             }
131             if (super.cachedPortName != null) {
132                 _call.setPortName(super.cachedPortName);
133             }
134             java.util.Enumeration keys = super.cachedProperties.keys();
135             while (keys.hasMoreElements()) {
136                 java.lang.String key = (java.lang.String) keys.nextElement();
137                 _call.setProperty(key, super.cachedProperties.get(key));
138             }
139             // All the type mapping information is registered
140             // when the first call is made.
141             // The type mapping information is actually registered in
142             // the TypeMappingRegistry of the service, which
143             // is the reason why registration is only needed for the first call.
144             synchronized (this) {
145                 if (firstCall()) {
146                     // must set encoding style before registering serializers
147                     _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
148                     _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
149                     for (int i = 0; i < cachedSerFactories.size(); ++i) {
150                         java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
151                         javax.xml.namespace.QName qName =
152                                 (javax.xml.namespace.QName) cachedSerQNames.get(i);
153                         java.lang.Object x = cachedSerFactories.get(i);
154                         if (x instanceof Class) {
155                             java.lang.Class sf = (java.lang.Class)
156                                  cachedSerFactories.get(i);
157                             java.lang.Class df = (java.lang.Class)
158                                  cachedDeserFactories.get(i);
159                             _call.registerTypeMapping(cls, qName, sf, df, false);
160                         }
161                         else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
162                             org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
163                                  cachedSerFactories.get(i);
164                             org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
165                                  cachedDeserFactories.get(i);
166                             _call.registerTypeMapping(cls, qName, sf, df, false);
167                         }
168                     }
169                 }
170             }
171             return _call;
172         }
173         catch (java.lang.Throwable _t) {
174             throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
175         }
176     }
177 
178     public com.liferay.client.soap.portlet.messageboards.model.MBBanSoap addBan(long banUserId, com.liferay.client.soap.portal.service.ServiceContext serviceContext) throws java.rmi.RemoteException {
179         if (super.cachedEndpoint == null) {
180             throw new org.apache.axis.NoEndPointException();
181         }
182         org.apache.axis.client.Call _call = createCall();
183         _call.setOperation(_operations[0]);
184         _call.setUseSOAPAction(true);
185         _call.setSOAPActionURI("");
186         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
187         _call.setOperationName(new javax.xml.namespace.QName("urn:http.service.messageboards.portlet.liferay.com", "addBan"));
188 
189         setRequestHeaders(_call);
190         setAttachments(_call);
191  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(banUserId), serviceContext});
192 
193         if (_resp instanceof java.rmi.RemoteException) {
194             throw (java.rmi.RemoteException)_resp;
195         }
196         else {
197             extractAttachments(_call);
198             try {
199                 return (com.liferay.client.soap.portlet.messageboards.model.MBBanSoap) _resp;
200             } catch (java.lang.Exception _exception) {
201                 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);
202             }
203         }
204   } catch (org.apache.axis.AxisFault axisFaultException) {
205   throw axisFaultException;
206 }
207     }
208 
209     public void deleteBan(long banUserId, com.liferay.client.soap.portal.service.ServiceContext serviceContext) throws java.rmi.RemoteException {
210         if (super.cachedEndpoint == null) {
211             throw new org.apache.axis.NoEndPointException();
212         }
213         org.apache.axis.client.Call _call = createCall();
214         _call.setOperation(_operations[1]);
215         _call.setUseSOAPAction(true);
216         _call.setSOAPActionURI("");
217         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
218         _call.setOperationName(new javax.xml.namespace.QName("urn:http.service.messageboards.portlet.liferay.com", "deleteBan"));
219 
220         setRequestHeaders(_call);
221         setAttachments(_call);
222  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(banUserId), serviceContext});
223 
224         if (_resp instanceof java.rmi.RemoteException) {
225             throw (java.rmi.RemoteException)_resp;
226         }
227         extractAttachments(_call);
228   } catch (org.apache.axis.AxisFault axisFaultException) {
229   throw axisFaultException;
230 }
231     }
232 
233 }
234