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