You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org> on 2006/07/19 11:26:14 UTC

[jira] Resolved: (AXIS2-782) ADB ConversionUtil throws exception when called with valid arrayList and BigInteger.class

     [ http://issues.apache.org/jira/browse/AXIS2-782?page=all ]

Ajith Harshana Ranabahu resolved AXIS2-782.
-------------------------------------------

    Resolution: Fixed

Modified the converter to handle BigIntegers and other such types that have a constructor with a string parameter.
A test case is also added

> ADB ConversionUtil throws exception when called with valid arrayList and BigInteger.class
> -----------------------------------------------------------------------------------------
>
>                 Key: AXIS2-782
>                 URL: http://issues.apache.org/jira/browse/AXIS2-782
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.0
>         Environment: Windows XP SP2 with Eclipse and Java 1.5.0_06
>            Reporter: Rincewind Wizard
>         Assigned To: Ajith Harshana Ranabahu
>         Attachments: schmain.java, SVMHCServiceBSNS.wsdl, SVMHCServiceCallbackHandler.java, SVMHCServiceStub.java
>
>
> We used WSDL2Java to create a client and a service using ADB databinding from a WSDL that contains the following return types:
> <xs:element name="predictEpitopesResponse">
>  <xs:complexType>
>   <xs:sequence>
>    <xs:element minOccurs="0" type="xs:integer" name="StartPositions" maxOccurs="unbounded"/>
>    <xs:element minOccurs="0" type="xs:double" name="Scores" maxOccurs="unbounded"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
> Curiously, WSDL2Java wants the integer array to be of type BigInteger, which is not what we expected (long maybe? how can we ensure this?)
> The code that causes the following exception looks like this:
> System.err.println(list1);
> object.setStartPositions( (java.math.BigInteger[])                                                org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(                                                    java.math.BigInteger.class, list1));
> This is the output of the err.println and the exception:
> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
> java.lang.RuntimeException: java.lang.ArrayStoreException
> 	at org.apache.axis2.SVMHCServiceStub.fromOM(SVMHCServiceStub.java:952)
> 	at org.apache.axis2.SVMHCServiceStub.predictEpitopes(SVMHCServiceStub.java:149)
> 	at org.apache.axis2.schmain.main(schmain.java:24)
> Caused by: java.lang.ArrayStoreException
> 	at java.lang.System.arraycopy(Native Method)
> 	at java.util.ArrayList.toArray(Unknown Source)
> 	at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:697)
> 	at org.apache.axis2.SVMHCServiceStub$PredictEpitopesResponse$Factory.parse(SVMHCServiceStub.java:791)
> 	at org.apache.axis2.SVMHCServiceStub.fromOM(SVMHCServiceStub.java:944)
> 	... 2 more
> We think it looks like the numbers are integers... so there's no reason why the ConverterUtil should fail like this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org