You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Martin Jericho <ma...@jabmail.com> on 2002/10/27 23:20:53 UTC
REPOST - Problem with multi-dimensional array
Could someone at least tell me whether multi-dimensional arrays are meant to work in 1.0? The only reason I am assuming they should is because of the claim on the website that "Axis ... has passed Sun's JAX-RPC and SAAJ compliance tests", and the JAX-RPC specification covers multi-dimensional arrays.
I would really appreciate it if anyone could give me even just a simple yes or no answer.
Martin
----- Original Message -----
From: Martin Jericho
To: axis-user@xml.apache.org
Sent: Friday, October 25, 2002 1:02 PM
Subject: Problem with multi-dimensional array
I just updated to Axis 1.0, but I'm having trouble with a multi-dimensional array. The client is sending a 2 dimensional array to the server, and everything looks fine in the request, but the server throws an exception when trying to parse it. I thought axis 1.0 is meant to support multi-dimensional arrays now?
Can anyone tell me what's going wrong?
Thanks
Martin
The relevant part of the request looks like this:
<iteratedMergeFieldData xsi:type="ns1:IteratedMergeFieldData">
<iterationName xsi:type="xsd:string">lineitems</iterationName>
<fieldValuesArray xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[5]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item>lineitemvalue0</item>
<item>lineitemvalue1</item>
<item>lineitemvalue2</item>
<item>lineitemvalue3</item>
<item>lineitemvalue4</item>
</fieldValuesArray>
<fieldValuesArray xsi:type="soapenc:Array" soapenc:arrayType="xsd:string[5]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item>lineitemvalue0</item>
<item>lineitemvalue1</item>
<item>lineitemvalue2</item>
<item>lineitemvalue3</item>
<item>lineitemvalue4</item>
</fieldValuesArray>
</iteratedMergeFieldData>
The relevant part of the WSDL looks like this:
<complexType name="IteratedMergeFieldData">
<sequence>
<element name="iterationName" nillable="true" type="xsd:string"/>
<element maxOccurs="unbounded" name="fieldValuesArray" nillable="true" type="impl:ArrayOf_xsd_string"/>
</sequence>
</complexType>
<complexType name="ArrayOf_xsd_string">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
</restriction>
</complexContent>
</complexType>
The axis log looks like this:
761725 [HttpProcessor[8080][4]] ERROR org.apache.axis.encoding.ser.BeanPropertyTarget - Could not convert [Ljava.lang.String; to bean field 'fieldValuesArray', type [Ljava.lang.String;
761735 [HttpProcessor[8080][4]] ERROR org.apache.axis.transport.http.AxisServlet - Exception:
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: java.lang.IllegalArgumentException: argument type mismatch
faultActor: null
faultDetail:
stackTrace: java.lang.IllegalArgumentException: argument type mismatch
at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:175)
at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:260)
at org.apache.axis.encoding.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.java:544)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:942)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:206)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:207)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:190)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:276)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:335)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
etc...