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 Adnene <ab...@infovista.com> on 2006/08/22 17:22:23 UTC

deserialization problem in axis 1.4 for an array of string

I am writing a client that access a webservise that provides a list of file
name by calling a 'get_file_list' method. This method returns a
get_file_listReturn of type ArrayOf_xsd_string and containing a list of
strings. Here is an example of the response soap body is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <ns1:get_file_listResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://schemas.cisco.com/ast/soap/">
      <get_file_listReturn soapenc:arrayType="ns1:ArrayOf_xsd_string[22]"
xsi:type="soapenc:Array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221000_3577</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221000_3577</item>
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221010_3578</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221010_3578</item>
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221015_3579</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221015_3579</item>
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221020_3580</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221020_3580</item>
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221025_3581</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221025_3581</item>
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221030_3582</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221030_3582</item>
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221040_3583</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221040_3583</item>
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221045_3584</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221045_3584</item>
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221050_3585</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221050_3585</item>
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221055_3586</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221055_3586</item>
        <item
xsi:type="xsd:string">cdr_StandAloneCluster_01_200608221100_3587</item>
        <item
xsi:type="xsd:string">cmr_StandAloneCluster_01_200608221100_3587</item>
      </get_file_listReturn>
    </ns1:get_file_listResponse>
  </soapenv:Body>
</soapenv:Envelope>
The binding stubs has been generated using WSDL2Java of AXIS 1.4.

The problem here is that AXIS does not correctly deserialize the result.
Instead it returns an array of null strings. The problem seems to happen
during the call of ArrayUtil.convertArrayToObject(arg, destClass) method.
For example the arg parameter value is
[[cdr_StandAloneCluster_01_200608221000_3577],
[cmr_StandAloneCluster_01_200608221000_3577], ..] where the returned value
is [null, null, ...]. The correct return value if this method should be
[cdr_StandAloneCluster_01_200608221000_3577,
cmr_StandAloneCluster_01_200608221000_3577, ..] 
Can any body help me get this work.
Thanks,

Adnene BEN ABDALLAH
-- 
View this message in context: http://www.nabble.com/deserialization-problem-in-axis-1.4-for-an-array-of-string-tf2146972.html#a5927757
Sent from the Axis - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org