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