Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336161

Summary: [feature] XmlElementWrapper validation and code-assist
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JAXBAssignee: Neil Hauge <neil.hauge>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: nan.n.li, neil.hauge, paul.fullbright
Version: 3.0   
Target Milestone: 3.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Karen Butzke CLA 2011-02-02 16:11:48 EST
We need validation for XmlElementWrapper name and namespace.
Comment 1 Nan Li CLA 2011-05-13 11:49:57 EDT
The spec. also defines the following constraints that XmlElementWrapper mapping must be enforced:

• The only additional mapping annotations allowed with
@XmlElementWrapper are: @XmlElement, @XmlElements, @XmlElementRef, @XmlElementRefs,@XmlJavaTypeAdapter.
• The property or the field must be a collection property.

Based on the current behavior, validation of the property type is gone when @XmlAttribute or @XmlAnyElement or something else applies. It seems that when a field/property is annotated with multiple annotations, we pick the one with higher priority and set the mapping type basd on it. If so, the behvior probably works as design. But users may not know this and be confused so we need make sure both constraints above are enforced while giving users clear instruction.
Comment 2 Paul Fullbright CLA 2011-06-06 11:41:24 EDT

*** This bug has been marked as a duplicate of bug 348151 ***