java.lang.ArrayStoreException while deserializing an array of structs ---------------------------------------------------------------------
Key: AXIS-2014 URL: http://issues.apache.org/jira/browse/AXIS-2014 Project: Axis Type: Bug Components: Serialization/Deserialization Versions: 1.2 Environment: Sun JDK 1.5.0_03 Windows XP Reporter: Robson Miranda Using the classes generated with wsdl4j with the WSDL found in http://soap.genome.ad.jp/KEGG.wsdl, i'm getting the following stacktrace: Exception in thread "main" AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.ArrayStoreException: org.apache.axis.encoding.ser.ArrayDeserializer$ArrayListExtension faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ArrayStoreException: org.apache.axis.encoding.ser.ArrayDeserializer$ArrayListExtension at org.apache.axis.utils.JavaUtils.convert(JavaUtils.java:472) at org.apache.axis.client.Call.invoke(Call.java:2518) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at kegg.soap.KEGGBindingStub.list_pathways(KEGGBindingStub.java:765) at org.biofoco.server.service.ExternalDatabaseService.main(ExternalDatabaseService.java:297) {http://xml.apache.org/axis/}hostname:lobato java.lang.ArrayStoreException: org.apache.axis.encoding.ser.ArrayDeserializer$ArrayListExtension at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.client.Call.invoke(Call.java:1820) at kegg.soap.KEGGBindingStub.list_pathways(KEGGBindingStub.java:765) Caused by: java.lang.ArrayStoreException: org.apache.axis.encoding.ser.ArrayDeserializer$ArrayListExtension at org.apache.axis.utils.JavaUtils.convert(JavaUtils.java:472) at org.apache.axis.client.Call.invoke(Call.java:2518) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) ... 2 more This exception is caused by the ArrayDeserializer, which tries to deserialize each of the structs (i.e. it is using ArrayDeserializer to deserialize a struct). Uncommenting the following lines in DeserializationContext.getDeserializerForClass(Class), I got it working. In this case, the correct deserializer is used for the structs. if (cls.isArray()) { cls = cls.getComponentType(); } Thanks, Robson Paniago -- 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