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