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