axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nandana Mihindukulasooriya (JIRA)" <>
Subject [jira] Resolved: (AXIS2-3974) BeanUtil.deserialize does not handle xsi:nil attribute properly
Date Fri, 22 Aug 2008 07:46:48 GMT


Nandana Mihindukulasooriya resolved AXIS2-3974.

    Resolution: Fixed

Applied Detelin's patch with some minor changes in revision 688008. 
Thanks Detelin. 

> BeanUtil.deserialize does not handle xsi:nil attribute properly
> ---------------------------------------------------------------
>                 Key: AXIS2-3974
>                 URL:
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: nightly
>         Environment: Axis2 Trunk with experimental multidimensional array support (thanks
to Amila)
>            Reporter: Detelin Yordanov
>         Attachments: BeanUtil_patch.txt, HTTP_log.txt,
> The BeanUtil.deserialize(Class, OMElement, ObjectSupplier, String) in Adb module does
not handle xsi:nil attributes on array elements properly.
> In the given example test case a 2D string array (that is part of a POJO) is being sent
to an Echo Java service.
> The 2D array contains an null array and a null array element:
> String[][] stringArray2D = new String[][] { new String[] { "axis2", null}, null}
> The request is send using ADB client stub and it's OK:
> <ns2:echoSimplePOJO xmlns:ns2="">
>     <ns2:simplePOJO>
>          <names xmlns="">
>              <names>axis2</names>
>              <names xmlns:xsi="" xsi:nil="1"
>           </names>
>           <ns1:names xmlns:ns1="" xmlns:xsi=""
xsi:nil="1" />
> </ns2:simplePOJO>
> The request, however, contains an empty string rather than a null string, and does not
contain the null array:
> <ns:return xmlns:xsi="" xmlns:ax23=""
>     <ax23:names>
>          <ax23:names>axis2</ax23:names>
>          <ax23:names></ax23:names>
>     </ax23:names>
> </ns:return>
> The problem is that the deserialize(..) method does not check for xsi:nil.
> Additionally it does not put deserialized null array elements inside the valueList, so
they are effectively skipped.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message