Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-1357

non nillable element sent as nil

    XMLWordPrintableJSON

Details

    Description

      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:

      wsdl2jav 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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bman007 Brian Speight
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: