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