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