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