Description
When there is a series of null/nil arguments in a call, getOMElement fails to increase the item count when it should leading to an "invalid value ... for " Fault on the server side.
The fix is pretty simple : add ++argCount before the continue int the arg == null test in getOMElement (see patch).
Example without the patch, the 4 item 1 are in fact 4 different arguments !
–
<getAudits xmlns="http://soap.entelience.com">
<arg0 xmlns="">false</arg0>
<item1 xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<item1 xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<item1 xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<item1 xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<arg1 xmlns="">false</arg1>
<arg2 xmlns="">reference</arg2>
<arg3 xmlns="">desc</arg3>
<arg4 xmlns="">1</arg4></getAudits>
–
With the fix, it's all clean
<getAudits xmlns="http://soap.entelience.com">
<arg0 xmlns="">false</arg0>
<item1 xmlns="">3</item1><item1 xmlns="">4</item1>
<item2 xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<item3 xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<item4 xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
<arg5 xmlns="">false</arg5>
<arg6 xmlns="">origin</arg6>
<arg7 xmlns="">asc</arg7>
<arg8 xmlns="">1</arg8>
</getAudits>
Patch is attached
— BeanUtil.java.orig 2013-02-01 13:01:30.000000000 +0100
+++ BeanUtil.java 2013-02-01 13:01:50.000000000 +0100
@@ -838,6 +838,7 @@
objects.add(partName);
}
objects.add(arg);
+ ++argCount;
continue;
}