Problem deserializing array of array of string using Document/Literal (Wrapped) 
style
-------------------------------------------------------------------------------------

         Key: AXIS-2352
         URL: http://issues.apache.org/jira/browse/AXIS-2352
     Project: Apache Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.3    
 Environment: Win 2000
    Reporter: E R Manuel
    Priority: Minor


To simpify things, I created this really simple class as a service.  All it 
does is return arrays of strings.
public class ArrOfArrOfStr {

        public String[][] testArrOfArrOfStr() {
                String[][] tstAAS = { 
                                { "1 of 1", "2 of 1", "3 of 1" },
                                { "1 of 2", "2 of 2", "3 of 2" },
                                { "1 of 3", "2 of 3", "3 of 3" }
                };
                return tstAAS;
        }
}

The client has this code:
                try {
                        aas = aasp.testArrOfArrOfStr();
                } catch (Exception ex) {
                        System.out.println("ERROR: " + ex.toString());
                        ex.printStackTrace();
                        System.exit(10);
                }

Here's the types section from the generated wsdl:
 <wsdl:types>
  <schema elementFormDefault="qualified" targetNamespace="http://wtp.test"; 
xmlns="http://www.w3.org/2001/XMLSchema";>
   <element name="testArrOfArrOfStr">
    <complexType/>
   </element>
   <element name="testArrOfArrOfStrResponse">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" name="testArrOfArrOfStrReturn" 
type="impl:ArrayOf_xsd_string"/>
     </sequence>
    </complexType>
   </element>
   <complexType name="ArrayOf_xsd_string">
    <sequence>
     <element maxOccurs="unbounded" minOccurs="0" name="item" 
type="xsd:string"/>
    </sequence>
   </complexType>
  </schema>
 </wsdl:types>

Here's the stack trace:
Dec 21, 2005 3:07:04 PM org.apache.axis.client.Call invoke
SEVERE: Exception:
org.xml.sax.SAXException: Found character data inside an array element while 
deserializing
        at 
org.apache.axis.encoding.ser.ArrayDeserializer.characters(ArrayDeserializer.java:502)
        at 
org.apache.axis.encoding.DeserializationContext.characters(DeserializationContext.java:966)
        at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:177)
        at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
        at org.apache.axis.client.Call.invoke(Call.java:2467)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at 
test.wtp.ArrOfArrOfStrSoapBindingStub.testArrOfArrOfStr(ArrOfArrOfStrSoapBindingStub.java:155)
        at 
test.wtp.ArrOfArrOfStrProxy.testArrOfArrOfStr(ArrOfArrOfStrProxy.java:45)
        at test.wtp.ArrOfArrClient.main(ArrOfArrClient.java:21)
ERROR: org.xml.sax.SAXException: Found character data inside an array element 
while deserializingAxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXException: Found character data inside an array 
element while deserializing
 faultActor: 
 faultNode: 
 faultDetail: 
        {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Found 
character data inside an array element while deserializing
        at 
org.apache.axis.encoding.ser.ArrayDeserializer.characters(ArrayDeserializer.java:502)
        at 
org.apache.axis.encoding.DeserializationContext.characters(DeserializationContext.java:966)
        at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:177)
        at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
        at org.apache.axis.client.Call.invoke(Call.java:2467)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at 
test.wtp.ArrOfArrOfStrSoapBindingStub.testArrOfArrOfStr(ArrOfArrOfStrSoapBindingStub.java:155)
        at 
test.wtp.ArrOfArrOfStrProxy.testArrOfArrOfStr(ArrOfArrOfStrProxy.java:45)
        at test.wtp.ArrOfArrClient.main(ArrOfArrClient.java:21)

        {http://xml.apache.org/axis/}hostname:exelon657120

org.xml.sax.SAXException: Found character data inside an array element while 
deserializing
        at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
        at org.apache.axis.client.Call.invoke(Call.java:2470)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at 
test.wtp.ArrOfArrOfStrSoapBindingStub.testArrOfArrOfStr(ArrOfArrOfStrSoapBindingStub.java:155)
        at 
test.wtp.ArrOfArrOfStrProxy.testArrOfArrOfStr(ArrOfArrOfStrProxy.java:45)
        at test.wtp.ArrOfArrClient.main(ArrOfArrClient.java:21)
Caused by: org.xml.sax.SAXException: Found character data inside an array 
element while deserializing
        at 
org.apache.axis.encoding.ser.ArrayDeserializer.characters(ArrayDeserializer.java:502)
        at 
org.apache.axis.encoding.DeserializationContext.characters(DeserializationContext.java:966)
        at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:177)
        at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
        at org.apache.axis.client.Call.invoke(Call.java:2467)
        ... 5 more



-- 
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

Reply via email to