You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Brian Speight <bs...@travelnow.com> on 2004/05/11 18:59:25 UTC
bug: non nillable element sent as nil
Thought I would run this by the list before I entered this bug...
Element defined in schema:
<element name="numberOfChildren" type="xsd:int" minOccurs="0"/>
When using Axis 1.2 Alpha:
wsdl2java generates this...
private int numberOfChildren;
and when not setting any value for this, this is what is sent in the SOAP request...
<numberOfChildren href="#id3"/>
<multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">0</multiRef>
So this works as expected.
But, when using Axis 1.2 Beta:
wsdl2java generates this...
private java.lang.Integer numberOfChildren;
and when not setting any value for this, this is what is sent in the SOAP request...
<numberOfChildren xsi:type="xsd:int" xsi:nil="true"/>
This element was not declared as nillable in the schema and when sent as nil blows up when trying to deserialize.
Thanks,
Brian