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