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