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

Bug 336877

Summary: [Validation] @XmlAnyElement validation enhancements and content assist
Product: [WebTools] Dali JPA Tools Reporter: Karen Butzke <karenfbutzke>
Component: JAXBAssignee: Paul Fullbright <paul.fullbright>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: neil.hauge, paul.fullbright
Version: 3.0Keywords: plan
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 336826    
Bug Blocks:    

Description Karen Butzke CLA 2011-02-10 16:18:10 EST
If a baseType has a property annotated with @XmlAnyElement, then
no other sub type in the inheritance hierarchy rooted at baseType can
contain a property annotated with @XmlAnyElement.

We can do this validation more completely once we have XmlElementRef and XmlElementRefs mapping annotation support. @XmlAnyElement can be a standalone mapping annotation or it can be used along with XmlElementRef/XmlElementRefs
Comment 1 Paul Fullbright CLA 2011-06-03 16:22:24 EDT
Also from the JAXB 2.2 spec (8.9.6.2)

- The only other JAXB annotations allowed with @XmlAnyElement are:
@XmlElementRefs.

Further investigation is needed to determine how validation and content assist differ from @XmlElementRefs as an annotation by itself.
Comment 2 Paul Fullbright CLA 2011-06-03 16:38:11 EDT
I believe that an @XmlAnyElement must also correspond to a wildcard (<xsd:any .. >), but this bears further investigation.
Comment 3 Paul Fullbright CLA 2011-10-20 14:13:13 EDT
(In reply to comment #2)
> I believe that an @XmlAnyElement must also correspond to a wildcard (<xsd:any
> .. >), but this bears further investigation.

This is incorrect.


Work for this is completed for 3.1 M3