Sure. Seems like it is a bug. You can first create a jira reporting the problem and then attach the patch for the fix.
Thanks Dimuthu On Thu, May 13, 2010 at 9:35 PM, Patrick Cosmo <[email protected]> wrote: > sorry about my typos, let me fix one: > > If this is a bug, would there be any objections to my fixing this problem > ...? > > -----Original Message----- > From: Patrick Cosmo > Sent: Thursday, May 13, 2010 11:56 AM > To: 'Apache AXIS C Developers List' > Cc: Sasa Vucenovic > Subject: Axis is_nil methods .. > > Hello, > > 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 set. > > 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 ( > http://72.5.124.55/javaee/6/docs/api/javax/xml/bind/JAXBElement.html): > > 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 ( > http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlObject.html > ): > > isNil > 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. > > > thanks, > > Patrick Cosmo > Incognito Software Inc. > Senior Software Design Engineer > T: +1(604)678-2855 > F: +1(604)688-4339 > E: [email protected] > www.incognito.com > > > > > http://www.incognito.com/uc > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Thanks, Dimuthu Gamage http://www.dimuthu.org http://www.wso2.org
