2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
3 * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
21 public class RegistryServiceSoapBindingStub extends
22 org.apache.axis.client.Stub implements ext.vamsas.IRegistry
24 private java.util.Vector cachedSerClasses = new java.util.Vector();
26 private java.util.Vector cachedSerQNames = new java.util.Vector();
28 private java.util.Vector cachedSerFactories = new java.util.Vector();
30 private java.util.Vector cachedDeserFactories = new java.util.Vector();
32 static org.apache.axis.description.OperationDesc[] _operations;
36 _operations = new org.apache.axis.description.OperationDesc[1];
37 _initOperationDesc1();
40 private static void _initOperationDesc1()
42 org.apache.axis.description.OperationDesc oper;
43 oper = new org.apache.axis.description.OperationDesc();
44 oper.setName("getServices");
45 oper.setReturnType(new javax.xml.namespace.QName(
46 "registry.objects.vamsas", "ServiceHandles"));
47 oper.setReturnClass(ext.vamsas.ServiceHandles.class);
48 oper.setReturnQName(new javax.xml.namespace.QName("",
49 "getServicesReturn"));
50 oper.setStyle(org.apache.axis.constants.Style.RPC);
51 oper.setUse(org.apache.axis.constants.Use.ENCODED);
52 _operations[0] = oper;
56 public RegistryServiceSoapBindingStub() throws org.apache.axis.AxisFault
61 public RegistryServiceSoapBindingStub(java.net.URL endpointURL,
62 javax.xml.rpc.Service service) throws org.apache.axis.AxisFault
65 super.cachedEndpoint = endpointURL;
68 public RegistryServiceSoapBindingStub(javax.xml.rpc.Service service)
69 throws org.apache.axis.AxisFault
73 super.service = new org.apache.axis.client.Service();
77 super.service = service;
80 javax.xml.namespace.QName qName;
81 java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
82 java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
83 // java.lang.Class enumsf =
84 // org.apache.axis.encoding.ser.EnumSerializerFactory.class;
85 // java.lang.Class enumdf =
86 // org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
87 java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
88 java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
89 // java.lang.Class simplesf =
90 // org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
91 // java.lang.Class simpledf =
92 // org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
93 // java.lang.Class simplelistsf =
94 // org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
95 // java.lang.Class simplelistdf =
96 // org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
97 qName = new javax.xml.namespace.QName("vamsas",
98 "ArrayOf_tns1_ServiceHandle");
99 cachedSerQNames.add(qName);
100 cls = ext.vamsas.ServiceHandle[].class;
101 cachedSerClasses.add(cls);
102 cachedSerFactories.add(arraysf);
103 cachedDeserFactories.add(arraydf);
105 qName = new javax.xml.namespace.QName("registry.objects.vamsas",
107 cachedSerQNames.add(qName);
108 cls = ext.vamsas.ServiceHandles.class;
109 cachedSerClasses.add(cls);
110 cachedSerFactories.add(beansf);
111 cachedDeserFactories.add(beandf);
113 qName = new javax.xml.namespace.QName("registry.objects.vamsas",
115 cachedSerQNames.add(qName);
116 cls = ext.vamsas.ServiceHandle.class;
117 cachedSerClasses.add(cls);
118 cachedSerFactories.add(beansf);
119 cachedDeserFactories.add(beandf);
123 protected org.apache.axis.client.Call createCall()
124 throws java.rmi.RemoteException
128 org.apache.axis.client.Call _call = (org.apache.axis.client.Call) super.service
130 if (super.maintainSessionSet)
132 _call.setMaintainSession(super.maintainSession);
134 if (super.cachedUsername != null)
136 _call.setUsername(super.cachedUsername);
138 if (super.cachedPassword != null)
140 _call.setPassword(super.cachedPassword);
142 if (super.cachedEndpoint != null)
144 _call.setTargetEndpointAddress(super.cachedEndpoint);
146 if (super.cachedTimeout != null)
148 _call.setTimeout(super.cachedTimeout);
150 if (super.cachedPortName != null)
152 _call.setPortName(super.cachedPortName);
154 java.util.Enumeration keys = super.cachedProperties.keys();
155 while (keys.hasMoreElements())
157 java.lang.String key = (java.lang.String) keys.nextElement();
158 _call.setProperty(key, super.cachedProperties.get(key));
160 // All the type mapping information is registered
161 // when the first call is made.
162 // The type mapping information is actually registered in
163 // the TypeMappingRegistry of the service, which
164 // is the reason why registration is only needed for the first call.
169 // must set encoding style before registering serializers
171 .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
172 _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
173 for (int i = 0; i < cachedSerFactories.size(); ++i)
175 java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
176 javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames
178 java.lang.Class sf = (java.lang.Class) cachedSerFactories
180 java.lang.Class df = (java.lang.Class) cachedDeserFactories
182 _call.registerTypeMapping(cls, qName, sf, df, false);
187 } catch (java.lang.Throwable _t)
189 throw new org.apache.axis.AxisFault(
190 "Failure trying to get the Call object", _t);
194 public ext.vamsas.ServiceHandles getServices()
195 throws java.rmi.RemoteException
197 if (super.cachedEndpoint == null)
199 throw new org.apache.axis.NoEndPointException();
201 org.apache.axis.client.Call _call = createCall();
202 _call.setOperation(_operations[0]);
203 _call.setUseSOAPAction(true);
204 _call.setSOAPActionURI("");
206 .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
207 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
210 setRequestHeaders(_call);
211 setAttachments(_call);
212 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
215 if (_resp instanceof java.rmi.RemoteException)
217 throw (java.rmi.RemoteException) _resp;
221 extractAttachments(_call);
224 return (ext.vamsas.ServiceHandles) _resp;
225 } catch (java.lang.Exception _exception)
227 return (ext.vamsas.ServiceHandles) org.apache.axis.utils.JavaUtils
228 .convert(_resp, ext.vamsas.ServiceHandles.class);