[ https://issues.apache.org/jira/browse/AXIS2-3974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
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: https://issues.apache.org/jira/browse/AXIS2-3974 > 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, NullArrayTest.zip > > > 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="http://test.tempuri.org"> > <ns2:simplePOJO> > <names xmlns="http://test.tempuri.org/xsd"> > <names>axis2</names> > <names xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:nil="1" /> > </names> > <ns1:names xmlns:ns1="http://test.tempuri.org/xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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="http://www.w3.org/2001/XMLSchema-instance" > xmlns:ax23="http://test.tempuri.org/xsd" xsi:type="ax23:SimplePOJO"> > <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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]