1   /**
2    * Portlet_Shopping_ShoppingItemServiceSoapBindingStub.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.shopping.service.http;
9   
10  public class Portlet_Shopping_ShoppingItemServiceSoapBindingStub extends org.apache.axis.client.Stub implements com.liferay.client.soap.portlet.shopping.service.http.ShoppingItemServiceSoap {
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("getItem");
28          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "itemId"), 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.shopping.portlet.liferay.com", "ShoppingItemSoap"));
31          oper.setReturnClass(com.liferay.client.soap.portlet.shopping.model.ShoppingItemSoap.class);
32          oper.setReturnQName(new javax.xml.namespace.QName("", "getItemReturn"));
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("addBookItems");
39          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);
40          oper.addParameter(param);
41          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "isbns"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("urn:http.service.shopping.portlet.liferay.com", "ArrayOf_xsd_string"), java.lang.String[].class, false, false);
42          oper.addParameter(param);
43          oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
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("deleteItem");
50          param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "itemId"), 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          oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
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 Portlet_Shopping_ShoppingItemServiceSoapBindingStub() throws org.apache.axis.AxisFault {
60           this(null);
61      }
62  
63      public Portlet_Shopping_ShoppingItemServiceSoapBindingStub(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 Portlet_Shopping_ShoppingItemServiceSoapBindingStub(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.shopping.portlet.liferay.com", "ShoppingItemSoap");
89              cachedSerQNames.add(qName);
90              cls = com.liferay.client.soap.portlet.shopping.model.ShoppingItemSoap.class;
91              cachedSerClasses.add(cls);
92              cachedSerFactories.add(beansf);
93              cachedDeserFactories.add(beandf);
94  
95              qName = new javax.xml.namespace.QName("urn:http.service.shopping.portlet.liferay.com", "ArrayOf_xsd_string");
96              cachedSerQNames.add(qName);
97              cls = java.lang.String[].class;
98              cachedSerClasses.add(cls);
99              qName = new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string");
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.soap.portlet.shopping.model.ShoppingItemSoap getItem(long itemId) 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.shopping.portlet.liferay.com", "getItem"));
181 
182         setRequestHeaders(_call);
183         setAttachments(_call);
184  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(itemId)});
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.soap.portlet.shopping.model.ShoppingItemSoap) _resp;
193             } catch (java.lang.Exception _exception) {
194                 return (com.liferay.client.soap.portlet.shopping.model.ShoppingItemSoap) org.apache.axis.utils.JavaUtils.convert(_resp, com.liferay.client.soap.portlet.shopping.model.ShoppingItemSoap.class);
195             }
196         }
197   } catch (org.apache.axis.AxisFault axisFaultException) {
198   throw axisFaultException;
199 }
200     }
201 
202     public void addBookItems(long categoryId, java.lang.String[] isbns) 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.shopping.portlet.liferay.com", "addBookItems"));
212 
213         setRequestHeaders(_call);
214         setAttachments(_call);
215  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(categoryId), isbns});
216 
217         if (_resp instanceof java.rmi.RemoteException) {
218             throw (java.rmi.RemoteException)_resp;
219         }
220         extractAttachments(_call);
221   } catch (org.apache.axis.AxisFault axisFaultException) {
222   throw axisFaultException;
223 }
224     }
225 
226     public void deleteItem(long itemId) throws java.rmi.RemoteException {
227         if (super.cachedEndpoint == null) {
228             throw new org.apache.axis.NoEndPointException();
229         }
230         org.apache.axis.client.Call _call = createCall();
231         _call.setOperation(_operations[2]);
232         _call.setUseSOAPAction(true);
233         _call.setSOAPActionURI("");
234         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
235         _call.setOperationName(new javax.xml.namespace.QName("urn:http.service.shopping.portlet.liferay.com", "deleteItem"));
236 
237         setRequestHeaders(_call);
238         setAttachments(_call);
239  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(itemId)});
240 
241         if (_resp instanceof java.rmi.RemoteException) {
242             throw (java.rmi.RemoteException)_resp;
243         }
244         extractAttachments(_call);
245   } catch (org.apache.axis.AxisFault axisFaultException) {
246   throw axisFaultException;
247 }
248     }
249 
250 }
251