2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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/>.
20 public class RegistryServiceSoapBindingStub extends
21 org.apache.axis.client.Stub implements ext.vamsas.IRegistry
23 private java.util.Vector cachedSerClasses = new java.util.Vector();
25 private java.util.Vector cachedSerQNames = new java.util.Vector();
27 private java.util.Vector cachedSerFactories = new java.util.Vector();
29 private java.util.Vector cachedDeserFactories = new java.util.Vector();
31 static org.apache.axis.description.OperationDesc[] _operations;
35 _operations = new org.apache.axis.description.OperationDesc[1];
36 _initOperationDesc1();
39 private static void _initOperationDesc1()
41 org.apache.axis.description.OperationDesc oper;
42 oper = new org.apache.axis.description.OperationDesc();
43 oper.setName("getServices");
44 oper.setReturnType(new javax.xml.namespace.QName(
45 "registry.objects.vamsas", "ServiceHandles"));
46 oper.setReturnClass(ext.vamsas.ServiceHandles.class);
47 oper.setReturnQName(new javax.xml.namespace.QName("",
48 "getServicesReturn"));
49 oper.setStyle(org.apache.axis.constants.Style.RPC);
50 oper.setUse(org.apache.axis.constants.Use.ENCODED);
51 _operations[0] = oper;
55 public RegistryServiceSoapBindingStub() throws org.apache.axis.AxisFault
60 public RegistryServiceSoapBindingStub(java.net.URL endpointURL,
61 javax.xml.rpc.Service service) throws org.apache.axis.AxisFault
64 super.cachedEndpoint = endpointURL;
67 public RegistryServiceSoapBindingStub(javax.xml.rpc.Service service)
68 throws org.apache.axis.AxisFault
72 super.service = new org.apache.axis.client.Service();
76 super.service = service;
79 javax.xml.namespace.QName qName;
80 java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
81 java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
82 // java.lang.Class enumsf =
83 // org.apache.axis.encoding.ser.EnumSerializerFactory.class;
84 // java.lang.Class enumdf =
85 // org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
86 java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
87 java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
88 // java.lang.Class simplesf =
89 // org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
90 // java.lang.Class simpledf =
91 // org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
92 // java.lang.Class simplelistsf =
93 // org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
94 // java.lang.Class simplelistdf =
95 // org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
96 qName = new javax.xml.namespace.QName("vamsas",
97 "ArrayOf_tns1_ServiceHandle");
98 cachedSerQNames.add(qName);
99 cls = ext.vamsas.ServiceHandle[].class;
100 cachedSerClasses.add(cls);
101 cachedSerFactories.add(arraysf);
102 cachedDeserFactories.add(arraydf);
104 qName = new javax.xml.namespace.QName("registry.objects.vamsas",
106 cachedSerQNames.add(qName);
107 cls = ext.vamsas.ServiceHandles.class;
108 cachedSerClasses.add(cls);
109 cachedSerFactories.add(beansf);
110 cachedDeserFactories.add(beandf);
112 qName = new javax.xml.namespace.QName("registry.objects.vamsas",
114 cachedSerQNames.add(qName);
115 cls = ext.vamsas.ServiceHandle.class;
116 cachedSerClasses.add(cls);
117 cachedSerFactories.add(beansf);
118 cachedDeserFactories.add(beandf);
122 protected org.apache.axis.client.Call createCall()
123 throws java.rmi.RemoteException
127 org.apache.axis.client.Call _call = (org.apache.axis.client.Call) super.service
129 if (super.maintainSessionSet)
131 _call.setMaintainSession(super.maintainSession);
133 if (super.cachedUsername != null)
135 _call.setUsername(super.cachedUsername);
137 if (super.cachedPassword != null)
139 _call.setPassword(super.cachedPassword);
141 if (super.cachedEndpoint != null)
143 _call.setTargetEndpointAddress(super.cachedEndpoint);
145 if (super.cachedTimeout != null)
147 _call.setTimeout(super.cachedTimeout);
149 if (super.cachedPortName != null)
151 _call.setPortName(super.cachedPortName);
153 java.util.Enumeration keys = super.cachedProperties.keys();
154 while (keys.hasMoreElements())
156 java.lang.String key = (java.lang.String) keys.nextElement();
157 _call.setProperty(key, super.cachedProperties.get(key));
159 // All the type mapping information is registered
160 // when the first call is made.
161 // The type mapping information is actually registered in
162 // the TypeMappingRegistry of the service, which
163 // is the reason why registration is only needed for the first call.
168 // must set encoding style before registering serializers
169 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
170 _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
171 for (int i = 0; i < cachedSerFactories.size(); ++i)
173 java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
174 javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames
176 java.lang.Class sf = (java.lang.Class) cachedSerFactories
178 java.lang.Class df = (java.lang.Class) cachedDeserFactories
180 _call.registerTypeMapping(cls, qName, sf, df, false);
185 } catch (java.lang.Throwable _t)
187 throw new org.apache.axis.AxisFault(
188 "Failure trying to get the Call object", _t);
192 public ext.vamsas.ServiceHandles getServices()
193 throws java.rmi.RemoteException
195 if (super.cachedEndpoint == null)
197 throw new org.apache.axis.NoEndPointException();
199 org.apache.axis.client.Call _call = createCall();
200 _call.setOperation(_operations[0]);
201 _call.setUseSOAPAction(true);
202 _call.setSOAPActionURI("");
203 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
204 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
207 setRequestHeaders(_call);
208 setAttachments(_call);
209 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
212 if (_resp instanceof java.rmi.RemoteException)
214 throw (java.rmi.RemoteException) _resp;
218 extractAttachments(_call);
221 return (ext.vamsas.ServiceHandles) _resp;
222 } catch (java.lang.Exception _exception)
224 return (ext.vamsas.ServiceHandles) org.apache.axis.utils.JavaUtils
225 .convert(_resp, ext.vamsas.ServiceHandles.class);