2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
3 * Copyright (C) 2008 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
22 extends org.apache.axis.client.Stub implements ext.vamsas.IRegistry
24 private java.util.Vector cachedSerClasses = new java.util.Vector();
25 private java.util.Vector cachedSerQNames = new java.util.Vector();
26 private java.util.Vector cachedSerFactories = new java.util.Vector();
27 private java.util.Vector cachedDeserFactories = new java.util.Vector();
29 static org.apache.axis.description.OperationDesc[] _operations;
33 _operations = new org.apache.axis.description.OperationDesc[1];
34 _initOperationDesc1();
37 private static void _initOperationDesc1()
39 org.apache.axis.description.OperationDesc oper;
40 oper = new org.apache.axis.description.OperationDesc();
41 oper.setName("getServices");
42 oper.setReturnType(new javax.xml.namespace.QName("registry.objects.vamsas",
44 oper.setReturnClass(ext.vamsas.ServiceHandles.class);
45 oper.setReturnQName(new javax.xml.namespace.QName("", "getServicesReturn"));
46 oper.setStyle(org.apache.axis.constants.Style.RPC);
47 oper.setUse(org.apache.axis.constants.Use.ENCODED);
48 _operations[0] = oper;
52 public RegistryServiceSoapBindingStub()
53 throws org.apache.axis.AxisFault
58 public RegistryServiceSoapBindingStub(java.net.URL endpointURL,
59 javax.xml.rpc.Service service)
60 throws org.apache.axis.AxisFault
63 super.cachedEndpoint = endpointURL;
66 public RegistryServiceSoapBindingStub(javax.xml.rpc.Service service)
67 throws org.apache.axis.AxisFault
71 super.service = new org.apache.axis.client.Service();
75 super.service = service;
78 javax.xml.namespace.QName qName;
79 java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
80 java.lang.Class beandf = org.apache.axis.encoding.ser.
81 BeanDeserializerFactory.class;
82 //java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
83 //java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
84 java.lang.Class arraysf = org.apache.axis.encoding.ser.
85 ArraySerializerFactory.class;
86 java.lang.Class arraydf = org.apache.axis.encoding.ser.
87 ArrayDeserializerFactory.class;
88 //java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
89 //java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
90 //java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
91 //java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
92 qName = new javax.xml.namespace.QName("vamsas",
93 "ArrayOf_tns1_ServiceHandle");
94 cachedSerQNames.add(qName);
95 cls = ext.vamsas.ServiceHandle[].class;
96 cachedSerClasses.add(cls);
97 cachedSerFactories.add(arraysf);
98 cachedDeserFactories.add(arraydf);
100 qName = new javax.xml.namespace.QName("registry.objects.vamsas",
102 cachedSerQNames.add(qName);
103 cls = ext.vamsas.ServiceHandles.class;
104 cachedSerClasses.add(cls);
105 cachedSerFactories.add(beansf);
106 cachedDeserFactories.add(beandf);
108 qName = new javax.xml.namespace.QName("registry.objects.vamsas",
110 cachedSerQNames.add(qName);
111 cls = ext.vamsas.ServiceHandle.class;
112 cachedSerClasses.add(cls);
113 cachedSerFactories.add(beansf);
114 cachedDeserFactories.add(beandf);
118 protected org.apache.axis.client.Call createCall()
119 throws java.rmi.RemoteException
123 org.apache.axis.client.Call _call =
124 (org.apache.axis.client.Call)super.service.createCall();
125 if (super.maintainSessionSet)
127 _call.setMaintainSession(super.maintainSession);
129 if (super.cachedUsername != null)
131 _call.setUsername(super.cachedUsername);
133 if (super.cachedPassword != null)
135 _call.setPassword(super.cachedPassword);
137 if (super.cachedEndpoint != null)
139 _call.setTargetEndpointAddress(super.cachedEndpoint);
141 if (super.cachedTimeout != null)
143 _call.setTimeout(super.cachedTimeout);
145 if (super.cachedPortName != null)
147 _call.setPortName(super.cachedPortName);
149 java.util.Enumeration keys = super.cachedProperties.keys();
150 while (keys.hasMoreElements())
152 java.lang.String key = (java.lang.String) keys.nextElement();
153 _call.setProperty(key, super.cachedProperties.get(key));
155 // All the type mapping information is registered
156 // when the first call is made.
157 // The type mapping information is actually registered in
158 // the TypeMappingRegistry of the service, which
159 // is the reason why registration is only needed for the first call.
164 // must set encoding style before registering serializers
165 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.
167 _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
168 for (int i = 0; i < cachedSerFactories.size(); ++i)
170 java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
171 javax.xml.namespace.QName qName =
172 (javax.xml.namespace.QName) cachedSerQNames.get(i);
173 java.lang.Class sf = (java.lang.Class)
174 cachedSerFactories.get(i);
175 java.lang.Class df = (java.lang.Class)
176 cachedDeserFactories.get(i);
177 _call.registerTypeMapping(cls, qName, sf, df, false);
183 catch (java.lang.Throwable _t)
185 throw new org.apache.axis.AxisFault(
186 "Failure trying to get the Call object", _t);
190 public ext.vamsas.ServiceHandles getServices()
191 throws java.rmi.RemoteException
193 if (super.cachedEndpoint == null)
195 throw new org.apache.axis.NoEndPointException();
197 org.apache.axis.client.Call _call = createCall();
198 _call.setOperation(_operations[0]);
199 _call.setUseSOAPAction(true);
200 _call.setSOAPActionURI("");
201 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
202 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
205 setRequestHeaders(_call);
206 setAttachments(_call);
207 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
210 if (_resp instanceof java.rmi.RemoteException)
212 throw (java.rmi.RemoteException) _resp;
216 extractAttachments(_call);
219 return (ext.vamsas.ServiceHandles) _resp;
221 catch (java.lang.Exception _exception)
223 return (ext.vamsas.ServiceHandles) org.apache.axis.utils.JavaUtils.
224 convert(_resp, ext.vamsas.ServiceHandles.class);