Hi.
I'm experiencing some strange behaviour with null arrays in my web service. I'm using JBoss 4.0.3.
When I create an array with one null item in it, it gets serialized to a SOAP message as the following:
<widgets xsi:nil="1"/>
But also whenever I set the array to null, it gets serialized as the following:
<widgets xsi:nil="1"/>
However, if I create an empty array it doesn't get serialized at all.
This seems a little strange to to me. Why would a null array be given the same meaning as an array with one null value in it? The behaviour for the empty array seems to be what I'd expect for a null array -- the array isn't serialized at all.
The problem I have is that my Axis client interprets <widgets xsi:nil="1"/> as an array with one null value in it (though this could possibly be a mis-interpretation on its part), which is pretty nasty for people coding against my client library to have to deal with.
Is there anything I can do about this? I'm aware that there's a lot of ambiguity surrounding arrays in SOAP, but this behaviour does seem a little odd to me.