Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336161 - [feature] XmlElementWrapper validation and code-assist
Summary: [feature] XmlElementWrapper validation and code-assist
Status: CLOSED DUPLICATE of bug 348151
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JAXB (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.1   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 16:11 EST by Karen Butzke CLA
Modified: 2011-10-07 16:00 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***