For example, it may be desirable to represent a "null" value being sent to or from a relational database with an element that is present. Such cases can be represented using XML Schema's nil mechanism, which enables an element to appear with or without a non-nil value.

<xsd:element name="shipDate" type="xsd:date" nillable="true"/>

And to explicitly represent that shipDate has a nil value in the instance document, we set the nil attribute (from the XML Schema namespace for instances) to true:

<shipDate xsi:nil="true"></shipDate>

However, the Bridge represents NULL values by omitting the elements holding these values, which is compliant to the SOAP 1.1 specification. This means, that the element shipDate would not occur in the document if its value is NULL.

Thus, the Importer uses the following rule when encountering the nillable attribute:

Mapping Rule: nillable is ignored.

  • No labels