axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert lazarski (JIRA)" <>
Subject [jira] [Commented] (AXIS-2914) Wrong deserialization of arrays
Date Wed, 14 Feb 2018 15:22:00 GMT


robert lazarski commented on AXIS-2914:

This project hasn't had an official release in so long, that any issues without patches have
little chance of being fixed.

Since you have a work around I am making the issue as won't fix.

> Wrong deserialization of arrays
> -------------------------------
>                 Key: AXIS-2914
>                 URL:
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.4
>         Environment: Java 1.8.0_66
>            Reporter: Andre Rothe
>            Priority: Major
> An external webservice returns a message
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" standalone="no"?><soapenv:Envelope xmlns:soapenv=""
xmlns:xsd="" xmlns:xsi=""><soapenv:Header><ns1:wosid
xmlns:ns1="" xmlns:soapenc=""
soapenv:actor="" soapenv:mustUnderstand="0" xsi:type="soapenc:string">KMN8CSp2A5BOd0OOOPizng</ns1:wosid><ns2:woinst
xmlns:ns2="" xmlns:soapenc=""
soapenv:actor="" soapenv:mustUnderstand="0" xsi:type="soapenc:string">1</ns2:woinst></soapenv:Header><soapenv:Body><ns3:projectDataResponse
xmlns:ns3="" soapenv:encodingStyle=""><projectDataReturn
xmlns:ns4="" xsi:type="ns4:ProjectDataResult"><errorCode
xsi:type="xsd:int">0</errorCode><message xmlns:soapenc=""
xsi:nil="true" xsi:type="soapenc:string"/><statusCode xsi:type="xsd:int">1</statusCode><project
xmlns:soapenc="" xsi:type="soapenc:string">ZKS</project><centres
xmlns:ns5="" xsi:type="ns5:CentreBean"><name xmlns:soapenc=""
xsi:type="soapenc:string">Center 1</name></centres><centres xmlns:ns6=""
xsi:type="ns6:CentreBean"><name xmlns:soapenc=""
xsi:type="soapenc:string">Center 2</name></centres></projectDataReturn></ns3:projectDataResponse></soapenv:Body></soapenv:Envelope>
> {code}
> But the Array contains only the last CentreBean object. I have seen in the code, that
the set() method of the BeanPropertyDescriptor overwrites the previous CenterBean object in
the target array. The object is casted to CentreBean[] with one entry and it is stored on
the same place as the first CenterBean.
> It seems, that it should be necessary to use an index property value greater than 0 to
access the right set() method (the one which can handle arrays), but the index is always -1,
and so it will use the simple one.
> Within the DeserializerImpl.class I have a CentreBean.class as value object within the
valueComplete() method (which is called after the endElement event during the XML parsing).
The first call to the BeanPropertyDescriptor.set() throws an exception because the object
type must be an array. After JavaUtils.convert() I have the right type, but the set() method
doesn't recognize, that there is a value already stored within the BeanPropertyDescriptor.
So the result will hold only the last one.
> Is this a problem with the deserializer or is there a problem with the Webservice description?

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message