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