2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 public class RegistryServiceSoapBindingStub extends
24 org.apache.axis.client.Stub implements ext.vamsas.IRegistry
26 private java.util.Vector cachedSerClasses = new java.util.Vector();
28 private java.util.Vector cachedSerQNames = new java.util.Vector();
30 private java.util.Vector cachedSerFactories = new java.util.Vector();
32 private java.util.Vector cachedDeserFactories = new java.util.Vector();
34 static org.apache.axis.description.OperationDesc[] _operations;
38 _operations = new org.apache.axis.description.OperationDesc[1];
39 _initOperationDesc1();
42 private static void _initOperationDesc1()
44 org.apache.axis.description.OperationDesc oper;
45 oper = new org.apache.axis.description.OperationDesc();
46 oper.setName("getServices");
47 oper.setReturnType(new javax.xml.namespace.QName(
48 "registry.objects.vamsas", "ServiceHandles"));
49 oper.setReturnClass(ext.vamsas.ServiceHandles.class);
50 oper.setReturnQName(new javax.xml.namespace.QName("",
51 "getServicesReturn"));
52 oper.setStyle(org.apache.axis.constants.Style.RPC);
53 oper.setUse(org.apache.axis.constants.Use.ENCODED);
54 _operations[0] = oper;
58 public RegistryServiceSoapBindingStub() throws org.apache.axis.AxisFault
63 public RegistryServiceSoapBindingStub(java.net.URL endpointURL,
64 javax.xml.rpc.Service service) throws org.apache.axis.AxisFault
67 super.cachedEndpoint = endpointURL;
70 public RegistryServiceSoapBindingStub(javax.xml.rpc.Service service)
71 throws org.apache.axis.AxisFault
75 super.service = new org.apache.axis.client.Service();
79 super.service = service;
82 javax.xml.namespace.QName qName;
83 java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
84 java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
85 // java.lang.Class enumsf =
86 // org.apache.axis.encoding.ser.EnumSerializerFactory.class;
87 // java.lang.Class enumdf =
88 // org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
89 java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
90 java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
91 // java.lang.Class simplesf =
92 // org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
93 // java.lang.Class simpledf =
94 // org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
95 // java.lang.Class simplelistsf =
96 // org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
97 // java.lang.Class simplelistdf =
98 // org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
99 qName = new javax.xml.namespace.QName("vamsas",
100 "ArrayOf_tns1_ServiceHandle");
101 cachedSerQNames.add(qName);
102 cls = ext.vamsas.ServiceHandle[].class;
103 cachedSerClasses.add(cls);
104 cachedSerFactories.add(arraysf);
105 cachedDeserFactories.add(arraydf);
107 qName = new javax.xml.namespace.QName("registry.objects.vamsas",
109 cachedSerQNames.add(qName);
110 cls = ext.vamsas.ServiceHandles.class;
111 cachedSerClasses.add(cls);
112 cachedSerFactories.add(beansf);
113 cachedDeserFactories.add(beandf);
115 qName = new javax.xml.namespace.QName("registry.objects.vamsas",
117 cachedSerQNames.add(qName);
118 cls = ext.vamsas.ServiceHandle.class;
119 cachedSerClasses.add(cls);
120 cachedSerFactories.add(beansf);
121 cachedDeserFactories.add(beandf);
125 protected org.apache.axis.client.Call createCall()
126 throws java.rmi.RemoteException
130 org.apache.axis.client.Call _call = (org.apache.axis.client.Call) super.service
132 if (super.maintainSessionSet)
134 _call.setMaintainSession(super.maintainSession);
136 if (super.cachedUsername != null)
138 _call.setUsername(super.cachedUsername);
140 if (super.cachedPassword != null)
142 _call.setPassword(super.cachedPassword);
144 if (super.cachedEndpoint != null)
146 _call.setTargetEndpointAddress(super.cachedEndpoint);
148 if (super.cachedTimeout != null)
150 _call.setTimeout(super.cachedTimeout);
152 if (super.cachedPortName != null)
154 _call.setPortName(super.cachedPortName);
156 java.util.Enumeration keys = super.cachedProperties.keys();
157 while (keys.hasMoreElements())
159 java.lang.String key = (java.lang.String) keys.nextElement();
160 _call.setProperty(key, super.cachedProperties.get(key));
162 // All the type mapping information is registered
163 // when the first call is made.
164 // The type mapping information is actually registered in
165 // the TypeMappingRegistry of the service, which
166 // is the reason why registration is only needed for the first call.
171 // must set encoding style before registering serializers
172 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
173 _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
174 for (int i = 0; i < cachedSerFactories.size(); ++i)
176 java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
177 javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames
179 java.lang.Class sf = (java.lang.Class) cachedSerFactories
181 java.lang.Class df = (java.lang.Class) cachedDeserFactories
183 _call.registerTypeMapping(cls, qName, sf, df, false);
188 } catch (java.lang.Throwable _t)
190 throw new org.apache.axis.AxisFault(
191 "Failure trying to get the Call object", _t);
195 public ext.vamsas.ServiceHandles getServices()
196 throws java.rmi.RemoteException
198 if (super.cachedEndpoint == null)
200 throw new org.apache.axis.NoEndPointException();
202 org.apache.axis.client.Call _call = createCall();
203 _call.setOperation(_operations[0]);
204 _call.setUseSOAPAction(true);
205 _call.setSOAPActionURI("");
206 _call.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);