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