You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Barry Fortune <BF...@yipes.com> on 2001/03/20 03:24:37 UTC
Marshalling arrays of arrays
We are using Apache SOAP ver 2.1 and are running into a problem to marshall
nested arrays.
The marshalling code cannot understand the typ "Array" - we ge the fault:
No mapping found for '
http://schemas.xmlsoap.org/soap/encoding/:Array' using encoding style
Does anyone have any ideas - we could write our own Serializer, but I am
trying to avoid this.
----------------------------------------------------------------------------
---------------------------------------------------------
The server code is:
public class SoapWithArrayService {
public String[][] manipulate(String[][] name) { return name; }
}
----------------------------------------------------------------------------
---------------------------------------------------------
The XML generated is:
<SOAP-ENV:Body>
<ns1:manipulate xmlns:ns1="soap-with-array"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<arryname xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:Array" ns2:arrayType="ns2:Array[2]">
<item xsi:type="ns2:Array" ns2:arrayType="xsd:string[2]">
<item xsi:type="xsd:string">One</item>
<item xsi:type="xsd:string">Two</item>
</item>
<item xsi:type="ns2:Array" ns2:arrayType="xsd:string[2]">
<item xsi:type="xsd:string">three</item>
<item xsi:type="xsd:string">four</item>
</item>
</arryname>
</ns1:manipulate>
</SOAP-ENV:Body>
----------------------------------------------------------------------------
---------------------------------------------------------
The Server generates a fault:
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>No mapping found for '
http://schemas.xmlsoap.org/soap/encoding/:Array' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'. </faultstring>
<faultactor>/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>