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)
Type: Bug
Components: databinding
Versions: 1.0
Environment: Windows XP SP2 with Eclipse and Java 1.5.0_06
Reporter: Rincewind Wizard
Attachments: SVMHCServiceBSNS.wsdl
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]