You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Shaun Collopy <Sh...@amnet.com.au> on 2002/03/12 05:32:00 UTC

Problem with Arrays

I am implementing a SOAP client where one of the responses I am trying to process contains an array of arrays.  I can handle Arrays of specific data types but get the following problem when the response contains an array of arrays.
 
[SOAPException: faultCode=SOAP-ENV:Client; msg=array element type mismatch; targetException=java.lang.IllegalArgumentException: array element type mismatch]
 at org.apache.soap.rpc.Call.invoke(Call.java:246)
 at SOAPClient.history(SOAPClient.java:215)
 at SOAPClientTester.testHistory(SOAPClientTester.java:157)
 
The XML response looks that defines the array of arrays is include below:
 
<history_result SOAP-ENC:arrayType="SOAP-ENC:Array[1]" xsi:type="SOAP-ENC:Array">
    <sms_history_result SOAP-ENC:arrayType="namesp2:SOAPStruct[6]" xsi:type="SOAP-ENC:Array">
 
Within each element in the Array there is an array of SOAPStructs.  I can confirm that I can handle Arrays of SOAPStructs but not an Array where each element contains an array of SOAPStructs.
 
I first notice the when I don't register a mapping for the 'Array' parameter type I get an error saying no mapping found.  I have added a mapping for 'Array' using the ArraySerializer.
 
Has any body seen this problem or have any ideas??
 
Kind Regards,
 
Shaun