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