This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We're using axis to generate Java stubs from our WSDL, but when we generate a message and send it, it includes elements without values as <blahblah xsi:nil="true" /> which causes the server side to reject the request. The other strange issue is that these nil elements are even included in the request when it is a choice, that is all of the choice elements are returned, with the extra elements having xsi:nil
I have tries specifying <xsd:element ... nillable="false"> for some of the elements in the xsd description, but so far this has not had any effect.
We're running Axis 1.3, I've tried targetting 1.0 when generating the stubs (-T 1.0 running WSDL2Java) but had no effect either.
We don't specify a 'nillable' attribute in the element, but we still get the xsi:nil in the message I found a thread stating that trying -W for the WSDL2Java command line has fixed this in the past, but not for us.
I should also mention that we control the server and the incorrect management of the 'nil' attribute is caused by the Castor deserialisation, but at this stage it will not be a simple operation to upgrade Castor or replace it with something more robust. The Castor deserialisation has been there a while and has some custom code added to it, although luckily it is cleanly layered should we need to cut it lose later.