update author list in license for (JAL-826)
[jalview.git] / src / ext / vamsas / MuscleWSSoapBindingStub.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
4  * 
5  * This file is part of Jalview.
6  * 
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.
10  * 
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.
15  * 
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  */
18 package ext.vamsas;
19
20 public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub
21         implements ext.vamsas.MuscleWS
22 {
23   static org.apache.axis.description.OperationDesc[] _operations;
24
25   static
26   {
27     _operations = new org.apache.axis.description.OperationDesc[4];
28     _initOperationDesc1();
29   }
30
31   private java.util.Vector cachedSerClasses = new java.util.Vector();
32
33   private java.util.Vector cachedSerQNames = new java.util.Vector();
34
35   private java.util.Vector cachedSerFactories = new java.util.Vector();
36
37   private java.util.Vector cachedDeserFactories = new java.util.Vector();
38
39   public MuscleWSSoapBindingStub() throws org.apache.axis.AxisFault
40   {
41     this(null);
42   }
43
44   public MuscleWSSoapBindingStub(java.net.URL endpointURL,
45           javax.xml.rpc.Service service) throws org.apache.axis.AxisFault
46   {
47     this(service);
48     super.cachedEndpoint = endpointURL;
49   }
50
51   public MuscleWSSoapBindingStub(javax.xml.rpc.Service service)
52           throws org.apache.axis.AxisFault
53   {
54     if (service == null)
55     {
56       super.service = new org.apache.axis.client.Service();
57     }
58     else
59     {
60       super.service = service;
61     }
62
63     java.lang.Class cls;
64     javax.xml.namespace.QName qName;
65     java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
66     java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
67     // java.lang.Class enumsf =
68     // org.apache.axis.encoding.ser.EnumSerializerFactory.class;
69     // java.lang.Class enumdf =
70     // org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
71     java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
72     java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
73     // java.lang.Class simplesf =
74     // org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
75     // java.lang.Class simpledf =
76     // org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
77     // java.lang.Class simplelistsf =
78     // org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
79     // java.lang.Class simplelistdf =
80     // org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
81     qName = new javax.xml.namespace.QName("simple.objects.vamsas",
82             "Sequence");
83     cachedSerQNames.add(qName);
84     cls = vamsas.objects.simple.Sequence.class;
85     cachedSerClasses.add(cls);
86     cachedSerFactories.add(beansf);
87     cachedDeserFactories.add(beandf);
88
89     qName = new javax.xml.namespace.QName("vamsas", "ArrayOf_tns1_Sequence");
90     cachedSerQNames.add(qName);
91     cls = vamsas.objects.simple.Sequence[].class;
92     cachedSerClasses.add(cls);
93     cachedSerFactories.add(arraysf);
94     cachedDeserFactories.add(arraydf);
95
96     qName = new javax.xml.namespace.QName("simple.objects.vamsas",
97             "MsaResult");
98     cachedSerQNames.add(qName);
99     cls = vamsas.objects.simple.MsaResult.class;
100     cachedSerClasses.add(cls);
101     cachedSerFactories.add(beansf);
102     cachedDeserFactories.add(beandf);
103
104     qName = new javax.xml.namespace.QName("simple.objects.vamsas",
105             "SequenceSet");
106     cachedSerQNames.add(qName);
107     cls = vamsas.objects.simple.SequenceSet.class;
108     cachedSerClasses.add(cls);
109     cachedSerFactories.add(beansf);
110     cachedDeserFactories.add(beandf);
111
112     qName = new javax.xml.namespace.QName("http://simple.objects.vamsas",
113             "Object");
114     cachedSerQNames.add(qName);
115     cls = vamsas.objects.simple.Object.class;
116     cachedSerClasses.add(cls);
117     cachedSerFactories.add(beansf);
118     cachedDeserFactories.add(beandf);
119
120     qName = new javax.xml.namespace.QName("simple.objects.vamsas",
121             "Alignment");
122     cachedSerQNames.add(qName);
123     cls = vamsas.objects.simple.Alignment.class;
124     cachedSerClasses.add(cls);
125     cachedSerFactories.add(beansf);
126     cachedDeserFactories.add(beandf);
127
128     qName = new javax.xml.namespace.QName("simple.objects.vamsas",
129             "WsJobId");
130     cachedSerQNames.add(qName);
131     cls = vamsas.objects.simple.WsJobId.class;
132     cachedSerClasses.add(cls);
133     cachedSerFactories.add(beansf);
134     cachedDeserFactories.add(beandf);
135
136     qName = new javax.xml.namespace.QName("vamsas", "ArrayOf_xsd_string");
137     cachedSerQNames.add(qName);
138     cls = java.lang.String[].class;
139     cachedSerClasses.add(cls);
140     cachedSerFactories.add(arraysf);
141     cachedDeserFactories.add(arraydf);
142
143     qName = new javax.xml.namespace.QName("simple.objects.vamsas", "Result");
144     cachedSerQNames.add(qName);
145     cls = vamsas.objects.simple.Result.class;
146     cachedSerClasses.add(cls);
147     cachedSerFactories.add(beansf);
148     cachedDeserFactories.add(beandf);
149   }
150
151   private static void _initOperationDesc1()
152   {
153     org.apache.axis.description.OperationDesc oper;
154     oper = new org.apache.axis.description.OperationDesc();
155     oper.setName("align");
156     oper.addParameter(new javax.xml.namespace.QName("", "seqSet"),
157             new javax.xml.namespace.QName("simple.objects.vamsas",
158                     "SequenceSet"),
159             vamsas.objects.simple.SequenceSet.class,
160             org.apache.axis.description.ParameterDesc.IN, false, false);
161     oper.setReturnType(new javax.xml.namespace.QName(
162             "simple.objects.vamsas", "WsJobId"));
163     oper.setReturnClass(vamsas.objects.simple.WsJobId.class);
164     oper.setReturnQName(new javax.xml.namespace.QName("", "alignReturn"));
165     oper.setStyle(org.apache.axis.constants.Style.RPC);
166     oper.setUse(org.apache.axis.constants.Use.ENCODED);
167     _operations[0] = oper;
168
169     oper = new org.apache.axis.description.OperationDesc();
170     oper.setName("getalign");
171     oper.addParameter(new javax.xml.namespace.QName("", "job_id"),
172             new javax.xml.namespace.QName(
173                     "http://www.w3.org/2001/XMLSchema", "string"),
174             java.lang.String.class,
175             org.apache.axis.description.ParameterDesc.IN, false, false);
176     oper.setReturnType(new javax.xml.namespace.QName(
177             "simple.objects.vamsas", "Alignment"));
178     oper.setReturnClass(vamsas.objects.simple.Alignment.class);
179     oper.setReturnQName(new javax.xml.namespace.QName("", "getalignReturn"));
180     oper.setStyle(org.apache.axis.constants.Style.RPC);
181     oper.setUse(org.apache.axis.constants.Use.ENCODED);
182     _operations[1] = oper;
183
184     oper = new org.apache.axis.description.OperationDesc();
185     oper.setName("getResult");
186     oper.addParameter(new javax.xml.namespace.QName("", "job_id"),
187             new javax.xml.namespace.QName(
188                     "http://www.w3.org/2001/XMLSchema", "string"),
189             java.lang.String.class,
190             org.apache.axis.description.ParameterDesc.IN, false, false);
191     oper.setReturnType(new javax.xml.namespace.QName(
192             "simple.objects.vamsas", "MsaResult"));
193     oper.setReturnClass(vamsas.objects.simple.MsaResult.class);
194     oper.setReturnQName(new javax.xml.namespace.QName("", "getResultReturn"));
195     oper.setStyle(org.apache.axis.constants.Style.RPC);
196     oper.setUse(org.apache.axis.constants.Use.ENCODED);
197     _operations[2] = oper;
198
199     oper = new org.apache.axis.description.OperationDesc();
200     oper.setName("cancel");
201     oper.addParameter(new javax.xml.namespace.QName("", "jobId"),
202             new javax.xml.namespace.QName(
203                     "http://www.w3.org/2001/XMLSchema", "string"),
204             java.lang.String.class,
205             org.apache.axis.description.ParameterDesc.IN, false, false);
206     oper.setReturnType(new javax.xml.namespace.QName(
207             "simple.objects.vamsas", "WsJobId"));
208     oper.setReturnClass(vamsas.objects.simple.WsJobId.class);
209     oper.setReturnQName(new javax.xml.namespace.QName("", "cancelReturn"));
210     oper.setStyle(org.apache.axis.constants.Style.RPC);
211     oper.setUse(org.apache.axis.constants.Use.ENCODED);
212     _operations[3] = oper;
213   }
214
215   protected org.apache.axis.client.Call createCall()
216           throws java.rmi.RemoteException
217   {
218     try
219     {
220       org.apache.axis.client.Call _call = (org.apache.axis.client.Call) super.service
221               .createCall();
222
223       if (super.maintainSessionSet)
224       {
225         _call.setMaintainSession(super.maintainSession);
226       }
227
228       if (super.cachedUsername != null)
229       {
230         _call.setUsername(super.cachedUsername);
231       }
232
233       if (super.cachedPassword != null)
234       {
235         _call.setPassword(super.cachedPassword);
236       }
237
238       if (super.cachedEndpoint != null)
239       {
240         _call.setTargetEndpointAddress(super.cachedEndpoint);
241       }
242
243       if (super.cachedTimeout != null)
244       {
245         _call.setTimeout(super.cachedTimeout);
246       }
247
248       if (super.cachedPortName != null)
249       {
250         _call.setPortName(super.cachedPortName);
251       }
252
253       java.util.Enumeration keys = super.cachedProperties.keys();
254
255       while (keys.hasMoreElements())
256       {
257         java.lang.String key = (java.lang.String) keys.nextElement();
258         _call.setProperty(key, super.cachedProperties.get(key));
259       }
260
261       // All the type mapping information is registered
262       // when the first call is made.
263       // The type mapping information is actually registered in
264       // the TypeMappingRegistry of the service, which
265       // is the reason why registration is only needed for the first call.
266       synchronized (this)
267       {
268         if (firstCall())
269         {
270           // must set encoding style before registering serializers
271           _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
272           _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
273
274           for (int i = 0; i < cachedSerFactories.size(); ++i)
275           {
276             java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
277             javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames
278                     .get(i);
279             java.lang.Class sf = (java.lang.Class) cachedSerFactories
280                     .get(i);
281             java.lang.Class df = (java.lang.Class) cachedDeserFactories
282                     .get(i);
283             _call.registerTypeMapping(cls, qName, sf, df, false);
284           }
285         }
286       }
287
288       return _call;
289     } catch (java.lang.Throwable _t)
290     {
291       throw new org.apache.axis.AxisFault(
292               "Failure trying to get the Call object", _t);
293     }
294   }
295
296   public vamsas.objects.simple.WsJobId align(
297           vamsas.objects.simple.SequenceSet seqSet)
298           throws java.rmi.RemoteException
299   {
300     if (super.cachedEndpoint == null)
301     {
302       throw new org.apache.axis.NoEndPointException();
303     }
304
305     org.apache.axis.client.Call _call = createCall();
306     _call.setOperation(_operations[0]);
307     _call.setUseSOAPAction(true);
308     _call.setSOAPActionURI("");
309     _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
310     _call.setOperationName(new javax.xml.namespace.QName("vamsas", "align"));
311
312     setRequestHeaders(_call);
313     setAttachments(_call);
314
315     java.lang.Object _resp = _call.invoke(new java.lang.Object[]
316     { seqSet });
317
318     if (_resp instanceof java.rmi.RemoteException)
319     {
320       throw (java.rmi.RemoteException) _resp;
321     }
322     else
323     {
324       extractAttachments(_call);
325
326       try
327       {
328         return (vamsas.objects.simple.WsJobId) _resp;
329       } catch (java.lang.Exception _exception)
330       {
331         return (vamsas.objects.simple.WsJobId) org.apache.axis.utils.JavaUtils
332                 .convert(_resp, vamsas.objects.simple.WsJobId.class);
333       }
334     }
335   }
336
337   public vamsas.objects.simple.Alignment getalign(java.lang.String job_id)
338           throws java.rmi.RemoteException
339   {
340     if (super.cachedEndpoint == null)
341     {
342       throw new org.apache.axis.NoEndPointException();
343     }
344
345     org.apache.axis.client.Call _call = createCall();
346     _call.setOperation(_operations[1]);
347     _call.setUseSOAPAction(true);
348     _call.setSOAPActionURI("");
349     _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
350     _call.setOperationName(new javax.xml.namespace.QName("vamsas",
351             "getalign"));
352
353     setRequestHeaders(_call);
354     setAttachments(_call);
355
356     java.lang.Object _resp = _call.invoke(new java.lang.Object[]
357     { job_id });
358
359     if (_resp instanceof java.rmi.RemoteException)
360     {
361       throw (java.rmi.RemoteException) _resp;
362     }
363     else
364     {
365       extractAttachments(_call);
366
367       try
368       {
369         return (vamsas.objects.simple.Alignment) _resp;
370       } catch (java.lang.Exception _exception)
371       {
372         return (vamsas.objects.simple.Alignment) org.apache.axis.utils.JavaUtils
373                 .convert(_resp, vamsas.objects.simple.Alignment.class);
374       }
375     }
376   }
377
378   public vamsas.objects.simple.MsaResult getResult(java.lang.String job_id)
379           throws java.rmi.RemoteException
380   {
381     if (super.cachedEndpoint == null)
382     {
383       throw new org.apache.axis.NoEndPointException();
384     }
385
386     org.apache.axis.client.Call _call = createCall();
387     _call.setOperation(_operations[2]);
388     _call.setUseSOAPAction(true);
389     _call.setSOAPActionURI("");
390     _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
391     _call.setOperationName(new javax.xml.namespace.QName("vamsas",
392             "getResult"));
393
394     setRequestHeaders(_call);
395     setAttachments(_call);
396
397     java.lang.Object _resp = _call.invoke(new java.lang.Object[]
398     { job_id });
399
400     if (_resp instanceof java.rmi.RemoteException)
401     {
402       throw (java.rmi.RemoteException) _resp;
403     }
404     else
405     {
406       extractAttachments(_call);
407
408       try
409       {
410         return (vamsas.objects.simple.MsaResult) _resp;
411       } catch (java.lang.Exception _exception)
412       {
413         return (vamsas.objects.simple.MsaResult) org.apache.axis.utils.JavaUtils
414                 .convert(_resp, vamsas.objects.simple.MsaResult.class);
415       }
416     }
417   }
418
419   public vamsas.objects.simple.WsJobId cancel(java.lang.String jobId)
420           throws java.rmi.RemoteException
421   {
422     if (super.cachedEndpoint == null)
423     {
424       throw new org.apache.axis.NoEndPointException();
425     }
426
427     org.apache.axis.client.Call _call = createCall();
428     _call.setOperation(_operations[3]);
429     _call.setUseSOAPAction(true);
430     _call.setSOAPActionURI("");
431     _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
432     _call.setOperationName(new javax.xml.namespace.QName("vamsas", "cancel"));
433
434     setRequestHeaders(_call);
435     setAttachments(_call);
436
437     java.lang.Object _resp = _call.invoke(new java.lang.Object[]
438     { jobId });
439
440     if (_resp instanceof java.rmi.RemoteException)
441     {
442       throw (java.rmi.RemoteException) _resp;
443     }
444     else
445     {
446       extractAttachments(_call);
447
448       try
449       {
450         return (vamsas.objects.simple.WsJobId) _resp;
451       } catch (java.lang.Exception _exception)
452       {
453         return (vamsas.objects.simple.WsJobId) org.apache.axis.utils.JavaUtils
454                 .convert(_resp, vamsas.objects.simple.WsJobId.class);
455       }
456     }
457   }
458 }