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