Using the @XmlElement annotation there is an attribute 'required'.
I've noticed that if I have an annotated field for which there is no
value and 'required = true' is NOT set on the annotation, then the
corresponding XML element is missing from the returned document.

I thought at first this was a bug as the XML document produced does
not conform to the corresponding XSD if the element is missing.
However, the @XmlElement documentation on the Sun site, describes the
attribute 'required' as:

"Customize the element declaration to be required."

which could be interpreted as, if not set the element itself is not required.

I don't understand this as for me the XML document is defined by the
XSD from which the XML marshalling code is generated.

So, is the behaviour I'm seeing the expected behaviour for XFire? Is
it the case that any element that must be present and may be nillable
must have 'required' set to true?

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to