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 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);
98 oper.setReturnQName(new javax.xml.namespace.QName("", "getresultReturn"));
99 oper.setStyle(org.apache.axis.constants.Style.RPC);
100 oper.setUse(org.apache.axis.constants.Use.ENCODED);
101 _operations[3] = oper;
105 public JpredSoapBindingStub() throws org.apache.axis.AxisFault
110 public JpredSoapBindingStub(java.net.URL endpointURL,
111 javax.xml.rpc.Service service) throws org.apache.axis.AxisFault
114 super.cachedEndpoint = endpointURL;
117 public JpredSoapBindingStub(javax.xml.rpc.Service service)
118 throws org.apache.axis.AxisFault
122 super.service = new org.apache.axis.client.Service();
126 super.service = service;
129 javax.xml.namespace.QName qName;
130 java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
131 java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
133 * java.lang.Class enumsf =
134 * org.apache.axis.encoding.ser.EnumSerializerFactory.class; java.lang.Class
135 * enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
136 * java.lang.Class arraysf =
137 * org.apache.axis.encoding.ser.ArraySerializerFactory.class;
138 * java.lang.Class arraydf =
139 * org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
140 * java.lang.Class simplesf =
141 * org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
142 * java.lang.Class simpledf =
143 * org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
144 * java.lang.Class simplelistsf =
145 * org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
146 * java.lang.Class simplelistdf =
147 * org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
149 qName = new javax.xml.namespace.QName("http://simple.objects.vamsas",
151 cachedSerQNames.add(qName);
152 cls = vamsas.objects.simple.JpredResult.class;
153 cachedSerClasses.add(cls);
154 cachedSerFactories.add(beansf);
155 cachedDeserFactories.add(beandf);
157 qName = new javax.xml.namespace.QName("simple.objects.vamsas", "Result");
158 cachedSerQNames.add(qName);
159 cls = vamsas.objects.simple.Result.class;
160 cachedSerClasses.add(cls);
161 cachedSerFactories.add(beansf);
162 cachedDeserFactories.add(beandf);
164 qName = new javax.xml.namespace.QName("http://simple.objects.vamsas",
166 cachedSerQNames.add(qName);
167 cls = vamsas.objects.simple.Secstructpred.class;
168 cachedSerClasses.add(cls);
169 cachedSerFactories.add(beansf);
170 cachedDeserFactories.add(beandf);
172 qName = new javax.xml.namespace.QName("http://simple.objects.vamsas",
174 cachedSerQNames.add(qName);
175 cls = vamsas.objects.simple.Msfalignment.class;
176 cachedSerClasses.add(cls);
177 cachedSerFactories.add(beansf);
178 cachedDeserFactories.add(beandf);
180 qName = new javax.xml.namespace.QName("simple.objects.vamsas",
182 cachedSerQNames.add(qName);
183 cls = vamsas.objects.simple.Sequence.class;
184 cachedSerClasses.add(cls);
185 cachedSerFactories.add(beansf);
186 cachedDeserFactories.add(beandf);
190 protected org.apache.axis.client.Call createCall()
191 throws java.rmi.RemoteException
195 org.apache.axis.client.Call _call = (org.apache.axis.client.Call) super.service
197 if (super.maintainSessionSet)
199 _call.setMaintainSession(super.maintainSession);
201 if (super.cachedUsername != null)
203 _call.setUsername(super.cachedUsername);
205 if (super.cachedPassword != null)
207 _call.setPassword(super.cachedPassword);
209 if (super.cachedEndpoint != null)
211 _call.setTargetEndpointAddress(super.cachedEndpoint);
213 if (super.cachedTimeout != null)
215 _call.setTimeout(super.cachedTimeout);
217 if (super.cachedPortName != null)
219 _call.setPortName(super.cachedPortName);
221 java.util.Enumeration keys = super.cachedProperties.keys();
222 while (keys.hasMoreElements())
224 java.lang.String key = (java.lang.String) keys.nextElement();
225 _call.setProperty(key, super.cachedProperties.get(key));
227 // All the type mapping information is registered
228 // when the first call is made.
229 // The type mapping information is actually registered in
230 // the TypeMappingRegistry of the service, which
231 // is the reason why registration is only needed for the first call.
236 // must set encoding style before registering serializers
237 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
238 _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
239 for (int i = 0; i < cachedSerFactories.size(); ++i)
241 java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
242 javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames
244 java.lang.Class sf = (java.lang.Class) cachedSerFactories
246 java.lang.Class df = (java.lang.Class) cachedDeserFactories
248 _call.registerTypeMapping(cls, qName, sf, df, false);
253 } catch (java.lang.Throwable _t)
255 throw new org.apache.axis.AxisFault(
256 "Failure trying to get the Call object", _t);
260 public java.lang.String predict(vamsas.objects.simple.Sequence seq)
261 throws java.rmi.RemoteException
263 if (super.cachedEndpoint == null)
265 throw new org.apache.axis.NoEndPointException();
267 org.apache.axis.client.Call _call = createCall();
268 _call.setOperation(_operations[0]);
269 _call.setUseSOAPAction(true);
270 _call.setSOAPActionURI("");
271 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
272 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
275 setRequestHeaders(_call);
276 setAttachments(_call);
277 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
280 if (_resp instanceof java.rmi.RemoteException)
282 throw (java.rmi.RemoteException) _resp;
286 extractAttachments(_call);
289 return (java.lang.String) _resp;
290 } catch (java.lang.Exception _exception)
292 return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(
293 _resp, java.lang.String.class);
298 public java.lang.String predictOnMsa(
299 vamsas.objects.simple.Msfalignment msf)
300 throws java.rmi.RemoteException
302 if (super.cachedEndpoint == null)
304 throw new org.apache.axis.NoEndPointException();
306 org.apache.axis.client.Call _call = createCall();
307 _call.setOperation(_operations[1]);
308 _call.setUseSOAPAction(true);
309 _call.setSOAPActionURI("");
310 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
311 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
314 setRequestHeaders(_call);
315 setAttachments(_call);
316 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
319 if (_resp instanceof java.rmi.RemoteException)
321 throw (java.rmi.RemoteException) _resp;
325 extractAttachments(_call);
328 return (java.lang.String) _resp;
329 } catch (java.lang.Exception _exception)
331 return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(
332 _resp, java.lang.String.class);
337 public vamsas.objects.simple.Secstructpred getpredict(
338 java.lang.String job_id) throws java.rmi.RemoteException
340 if (super.cachedEndpoint == null)
342 throw new org.apache.axis.NoEndPointException();
344 org.apache.axis.client.Call _call = createCall();
345 _call.setOperation(_operations[2]);
346 _call.setUseSOAPAction(true);
347 _call.setSOAPActionURI("");
348 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
349 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
352 setRequestHeaders(_call);
353 setAttachments(_call);
354 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
357 if (_resp instanceof java.rmi.RemoteException)
359 throw (java.rmi.RemoteException) _resp;
363 extractAttachments(_call);
366 return (vamsas.objects.simple.Secstructpred) _resp;
367 } catch (java.lang.Exception _exception)
369 return (vamsas.objects.simple.Secstructpred) org.apache.axis.utils.JavaUtils
370 .convert(_resp, vamsas.objects.simple.Secstructpred.class);
375 public vamsas.objects.simple.JpredResult getresult(java.lang.String job_id)
376 throws java.rmi.RemoteException
378 if (super.cachedEndpoint == null)
380 throw new org.apache.axis.NoEndPointException();
382 org.apache.axis.client.Call _call = createCall();
383 _call.setOperation(_operations[3]);
384 _call.setUseSOAPAction(true);
385 _call.setSOAPActionURI("");
386 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
387 _call.setOperationName(new javax.xml.namespace.QName("vamsas",
390 setRequestHeaders(_call);
391 setAttachments(_call);
392 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
395 if (_resp instanceof java.rmi.RemoteException)
397 throw (java.rmi.RemoteException) _resp;
401 extractAttachments(_call);
404 return (vamsas.objects.simple.JpredResult) _resp;
405 } catch (java.lang.Exception _exception)
407 return (vamsas.objects.simple.JpredResult) org.apache.axis.utils.JavaUtils
408 .convert(_resp, vamsas.objects.simple.JpredResult.class);