This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
background: XmlElement annotation required=false is ignored if the field is a primitive Example; @XmlElement(required=false) public int value; this is exposed as <xs:element name="value" type="xs:int"/> Doing the same on Integer; @XmlElement(required=false) public Integer value; <xs:element name="value" type="xs:int" minOccurs="0"/> There should have been a warning, or hint to rewrite the int primitive to Integer in this case, because the annotation does not what the user may expect. I have been bitten by this twice now, since I forgot this rule, and I needed to add some functionality in a webservice that should be backward compatible to existing clients, thus I need to add a field that is not required (minOccurs="0") and clients broke horribly when adding this as a primitive, and I thought the annotation would work.