2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
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
170 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
171 _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
172 for (int i = 0; i < cachedSerFactories.size(); ++i)
174 java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
175 javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames
177 java.lang.Class sf = (java.lang.Class) cachedSerFactories
179 java.lang.Class df = (java.lang.Class) cachedDeserFactories
181 _call.registerTypeMapping(cls, qName, sf, df, false);
186 } catch (java.lang.Throwable _t)
188 throw new org.apache.axis.AxisFault(
189 "Failure trying to get the Call object", _t);
193 public ext.vamsas.ServiceHandles getServices()
194 throws java.rmi.RemoteException
196 if (super.cachedEndpoint == null)
198 throw new org.apache.axis.NoEndPointException();
200 org.apache.axis.client.Call _call = createCall();
201 _call.setOperation(_operations[0]);
202 _call.setUseSOAPAction(true);
203 _call.setSOAPActionURI("");
204 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
205 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
208 setRequestHeaders(_call);
209 setAttachments(_call);
210 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
213 if (_resp instanceof java.rmi.RemoteException)
215 throw (java.rmi.RemoteException) _resp;
219 extractAttachments(_call);
222 return (ext.vamsas.ServiceHandles) _resp;
223 } catch (java.lang.Exception _exception)
225 return (ext.vamsas.ServiceHandles) org.apache.axis.utils.JavaUtils
226 .convert(_resp, ext.vamsas.ServiceHandles.class);