2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
3 * Copyright (C) 2010 J Procter, AM Waterhouse, 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 JpredSoapBindingStub extends org.apache.axis.client.Stub
21 implements ext.vamsas.Jpred
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[4];
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("predict");
44 oper.addParameter(new javax.xml.namespace.QName("", "seq"),
45 new javax.xml.namespace.QName("simple.objects.vamsas",
46 "Sequence"), vamsas.objects.simple.Sequence.class,
47 org.apache.axis.description.ParameterDesc.IN, false, false);
48 oper.setReturnType(new javax.xml.namespace.QName(
49 "http://www.w3.org/2001/XMLSchema", "string"));
50 oper.setReturnClass(java.lang.String.class);
51 oper.setReturnQName(new javax.xml.namespace.QName("", "predictReturn"));
52 oper.setStyle(org.apache.axis.constants.Style.RPC);
53 oper.setUse(org.apache.axis.constants.Use.ENCODED);
54 _operations[0] = oper;
56 oper = new org.apache.axis.description.OperationDesc();
57 oper.setName("predictOnMsa");
58 oper.addParameter(new javax.xml.namespace.QName("", "msf"),
59 new javax.xml.namespace.QName("http://simple.objects.vamsas",
61 vamsas.objects.simple.Msfalignment.class,
62 org.apache.axis.description.ParameterDesc.IN, false, false);
63 oper.setReturnType(new javax.xml.namespace.QName(
64 "http://www.w3.org/2001/XMLSchema", "string"));
65 oper.setReturnClass(java.lang.String.class);
66 oper.setReturnQName(new javax.xml.namespace.QName("",
67 "predictOnMsaReturn"));
68 oper.setStyle(org.apache.axis.constants.Style.RPC);
69 oper.setUse(org.apache.axis.constants.Use.ENCODED);
70 _operations[1] = oper;
72 oper = new org.apache.axis.description.OperationDesc();
73 oper.setName("getpredict");
74 oper.addParameter(new javax.xml.namespace.QName("", "job_id"),
75 new javax.xml.namespace.QName(
76 "http://www.w3.org/2001/XMLSchema", "string"),
77 java.lang.String.class,
78 org.apache.axis.description.ParameterDesc.IN, false, false);
79 oper.setReturnType(new javax.xml.namespace.QName(
80 "http://simple.objects.vamsas", "Secstructpred"));
81 oper.setReturnClass(vamsas.objects.simple.Secstructpred.class);
82 oper.setReturnQName(new javax.xml.namespace.QName("",
84 oper.setStyle(org.apache.axis.constants.Style.RPC);
85 oper.setUse(org.apache.axis.constants.Use.ENCODED);
86 _operations[2] = oper;
88 oper = new org.apache.axis.description.OperationDesc();
89 oper.setName("getresult");
90 oper.addParameter(new javax.xml.namespace.QName("", "job_id"),
91 new javax.xml.namespace.QName(
92 "http://www.w3.org/2001/XMLSchema", "string"),
93 java.lang.String.class,
94 org.apache.axis.description.ParameterDesc.IN, false, false);
95 oper.setReturnType(new javax.xml.namespace.QName(
96 "http://simple.objects.vamsas", "JpredResult"));
97 oper.setReturnClass(vamsas.objects.simple.JpredResult.class);
99 .setReturnQName(new javax.xml.namespace.QName("",
101 oper.setStyle(org.apache.axis.constants.Style.RPC);
102 oper.setUse(org.apache.axis.constants.Use.ENCODED);
103 _operations[3] = oper;
107 public JpredSoapBindingStub() throws org.apache.axis.AxisFault
112 public JpredSoapBindingStub(java.net.URL endpointURL,
113 javax.xml.rpc.Service service) throws org.apache.axis.AxisFault
116 super.cachedEndpoint = endpointURL;
119 public JpredSoapBindingStub(javax.xml.rpc.Service service)
120 throws org.apache.axis.AxisFault
124 super.service = new org.apache.axis.client.Service();
128 super.service = service;
131 javax.xml.namespace.QName qName;
132 java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
133 java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
135 * java.lang.Class enumsf =
136 * org.apache.axis.encoding.ser.EnumSerializerFactory.class; java.lang.Class
137 * enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
138 * java.lang.Class arraysf =
139 * org.apache.axis.encoding.ser.ArraySerializerFactory.class;
140 * java.lang.Class arraydf =
141 * org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
142 * java.lang.Class simplesf =
143 * org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
144 * java.lang.Class simpledf =
145 * org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
146 * java.lang.Class simplelistsf =
147 * org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
148 * java.lang.Class simplelistdf =
149 * org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
151 qName = new javax.xml.namespace.QName("http://simple.objects.vamsas",
153 cachedSerQNames.add(qName);
154 cls = vamsas.objects.simple.JpredResult.class;
155 cachedSerClasses.add(cls);
156 cachedSerFactories.add(beansf);
157 cachedDeserFactories.add(beandf);
159 qName = new javax.xml.namespace.QName("simple.objects.vamsas", "Result");
160 cachedSerQNames.add(qName);
161 cls = vamsas.objects.simple.Result.class;
162 cachedSerClasses.add(cls);
163 cachedSerFactories.add(beansf);
164 cachedDeserFactories.add(beandf);
166 qName = new javax.xml.namespace.QName("http://simple.objects.vamsas",
168 cachedSerQNames.add(qName);
169 cls = vamsas.objects.simple.Secstructpred.class;
170 cachedSerClasses.add(cls);
171 cachedSerFactories.add(beansf);
172 cachedDeserFactories.add(beandf);
174 qName = new javax.xml.namespace.QName("http://simple.objects.vamsas",
176 cachedSerQNames.add(qName);
177 cls = vamsas.objects.simple.Msfalignment.class;
178 cachedSerClasses.add(cls);
179 cachedSerFactories.add(beansf);
180 cachedDeserFactories.add(beandf);
182 qName = new javax.xml.namespace.QName("simple.objects.vamsas",
184 cachedSerQNames.add(qName);
185 cls = vamsas.objects.simple.Sequence.class;
186 cachedSerClasses.add(cls);
187 cachedSerFactories.add(beansf);
188 cachedDeserFactories.add(beandf);
192 protected org.apache.axis.client.Call createCall()
193 throws java.rmi.RemoteException
197 org.apache.axis.client.Call _call = (org.apache.axis.client.Call) super.service
199 if (super.maintainSessionSet)
201 _call.setMaintainSession(super.maintainSession);
203 if (super.cachedUsername != null)
205 _call.setUsername(super.cachedUsername);
207 if (super.cachedPassword != null)
209 _call.setPassword(super.cachedPassword);
211 if (super.cachedEndpoint != null)
213 _call.setTargetEndpointAddress(super.cachedEndpoint);
215 if (super.cachedTimeout != null)
217 _call.setTimeout(super.cachedTimeout);
219 if (super.cachedPortName != null)
221 _call.setPortName(super.cachedPortName);
223 java.util.Enumeration keys = super.cachedProperties.keys();
224 while (keys.hasMoreElements())
226 java.lang.String key = (java.lang.String) keys.nextElement();
227 _call.setProperty(key, super.cachedProperties.get(key));
229 // All the type mapping information is registered
230 // when the first call is made.
231 // The type mapping information is actually registered in
232 // the TypeMappingRegistry of the service, which
233 // is the reason why registration is only needed for the first call.
238 // must set encoding style before registering serializers
240 .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
241 _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
242 for (int i = 0; i < cachedSerFactories.size(); ++i)
244 java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
245 javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames
247 java.lang.Class sf = (java.lang.Class) cachedSerFactories
249 java.lang.Class df = (java.lang.Class) cachedDeserFactories
251 _call.registerTypeMapping(cls, qName, sf, df, false);
256 } catch (java.lang.Throwable _t)
258 throw new org.apache.axis.AxisFault(
259 "Failure trying to get the Call object", _t);
263 public java.lang.String predict(vamsas.objects.simple.Sequence seq)
264 throws java.rmi.RemoteException
266 if (super.cachedEndpoint == null)
268 throw new org.apache.axis.NoEndPointException();
270 org.apache.axis.client.Call _call = createCall();
271 _call.setOperation(_operations[0]);
272 _call.setUseSOAPAction(true);
273 _call.setSOAPActionURI("");
275 .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
276 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
279 setRequestHeaders(_call);
280 setAttachments(_call);
281 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
284 if (_resp instanceof java.rmi.RemoteException)
286 throw (java.rmi.RemoteException) _resp;
290 extractAttachments(_call);
293 return (java.lang.String) _resp;
294 } catch (java.lang.Exception _exception)
296 return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(
297 _resp, java.lang.String.class);
302 public java.lang.String predictOnMsa(
303 vamsas.objects.simple.Msfalignment msf)
304 throws java.rmi.RemoteException
306 if (super.cachedEndpoint == null)
308 throw new org.apache.axis.NoEndPointException();
310 org.apache.axis.client.Call _call = createCall();
311 _call.setOperation(_operations[1]);
312 _call.setUseSOAPAction(true);
313 _call.setSOAPActionURI("");
315 .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
316 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
319 setRequestHeaders(_call);
320 setAttachments(_call);
321 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
324 if (_resp instanceof java.rmi.RemoteException)
326 throw (java.rmi.RemoteException) _resp;
330 extractAttachments(_call);
333 return (java.lang.String) _resp;
334 } catch (java.lang.Exception _exception)
336 return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(
337 _resp, java.lang.String.class);
342 public vamsas.objects.simple.Secstructpred getpredict(
343 java.lang.String job_id) throws java.rmi.RemoteException
345 if (super.cachedEndpoint == null)
347 throw new org.apache.axis.NoEndPointException();
349 org.apache.axis.client.Call _call = createCall();
350 _call.setOperation(_operations[2]);
351 _call.setUseSOAPAction(true);
352 _call.setSOAPActionURI("");
354 .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
355 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
358 setRequestHeaders(_call);
359 setAttachments(_call);
360 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
363 if (_resp instanceof java.rmi.RemoteException)
365 throw (java.rmi.RemoteException) _resp;
369 extractAttachments(_call);
372 return (vamsas.objects.simple.Secstructpred) _resp;
373 } catch (java.lang.Exception _exception)
375 return (vamsas.objects.simple.Secstructpred) org.apache.axis.utils.JavaUtils
376 .convert(_resp, vamsas.objects.simple.Secstructpred.class);
381 public vamsas.objects.simple.JpredResult getresult(java.lang.String job_id)
382 throws java.rmi.RemoteException
384 if (super.cachedEndpoint == null)
386 throw new org.apache.axis.NoEndPointException();
388 org.apache.axis.client.Call _call = createCall();
389 _call.setOperation(_operations[3]);
390 _call.setUseSOAPAction(true);
391 _call.setSOAPActionURI("");
393 .setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
394 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
397 setRequestHeaders(_call);
398 setAttachments(_call);
399 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
402 if (_resp instanceof java.rmi.RemoteException)
404 throw (java.rmi.RemoteException) _resp;
408 extractAttachments(_call);
411 return (vamsas.objects.simple.JpredResult) _resp;
412 } catch (java.lang.Exception _exception)
414 return (vamsas.objects.simple.JpredResult) org.apache.axis.utils.JavaUtils
415 .convert(_resp, vamsas.objects.simple.JpredResult.class);