axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Cosmo <>
Subject Axis is_nil methods ..
Date Thu, 13 May 2010 15:56:00 GMT

We notice that the Axis generated "is_<elementName>_nil" methods will return AXIS2_TRUE
if an element is not supplied at all (even if this value is not defined as being nillable
in the XSD). Is this a bug?

My understanding is that an isNil method for XML should only return true if:

an element was provided in the XML without content and with the xsi:isnil="true" attribute

Other XML libraries (JaxB, Apache) seem provide a definition of is_nil that conforms to this
definition, I've provided some reference below.

If this is a bug, would there by any objects to my fixing this problem and providing Axis
code diffs that implement the generated is_nil methods to only return AXIS2_TRUE when the
above condition is met.

The Jaxb library documents this for nil (

boolean isNil()
          Returns true iff this element instance content model is nil.

protected  boolean nil
          true iff the xml element instance has xsi:nil="true".

and the Apache library documents there "isNil" method as follows (

public boolean isNil()

True if the value is nil. Note that in order to be nil, the value must be in an element, and
the element containing the value must be marked as nillable in the schema.


Patrick Cosmo
Incognito Software Inc.
Senior Software Design Engineer
T: +1(604)678-2855
F: +1(604)688-4339

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message