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