| Summary: | [Validation] @XmlElementRef validation and content assist | ||
|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Paul Fullbright <paul.fullbright> |
| Component: | JAXB | Assignee: | Paul Fullbright <paul.fullbright> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | neil.hauge |
| Version: | 3.0 | ||
| Target Milestone: | 3.1 M2 | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | |||
Correction from: - If the collection item type (for collection property) or property type (for single valued property) is not javax.xml.bind.JAXBElement, then the type referenced by the property or field must be annotated with @XmlRootElement to: - If the collection item type (for collection property) or property type (for single valued property) is not javax.xml.bind.JAXBElement, then the type referenced by the property or field must have a type *in its hierarchy* annotated with @XmlRootElement Completed for M2 |
From the JAXB 2.2 spec (8.9.3.2) - The only other additional JAXB mapping annotations allowed with @XmlElementRef are: @XmlElementWrapper and @XmlJavaTypeAdapter. - If the collection item type or property type (for single valued property) is javax.xml.bind.JAXBElement, then {@XmlElementRef.name(),@XmlElementRef.namespace() } must point an element factory method with an @XmlElementDecl annotation in a class annotated with @XmlRegistry (usually ObjectFactory class generated by the schema compiler) : a. @XmlElementDecl.name() must equal @XmlElementRef.name() b. @XmlElementDecl.namespace() must equal @XmlElementRef.namespace(). - If the collection item type (for collection property) or property type (for single valued property) is not javax.xml.bind.JAXBElement, then the type referenced by the property or field must be annotated with @XmlRootElement Content assist is needed for name and namespace.