Community
Participate
Working Groups
(Occurs in 2.4 dev stream) The following model: @XmlRootElement(name="root") public class Root { @XmlElementRefs({ @XmlElementRef(name = "foo", type = Foo.class), @XmlElementRef(name = "bar", type = Bar.class) }) public List content = new ArrayList(); } @XmlRootElement(name="foo") @XmlSeeAlso(SubFoo.class) public class Foo {} @XmlRootElement(name="subfoo") public class SubFoo extends Foo {} @XmlRootElement(name="bar") @XmlSeeAlso(SubBar.class) public class Bar {} @XmlRootElement(name="subbar") public class SubBar extends Bar {} throws a JAXBException on marshalling (using Root.class as the context). This works with the RI and generates an XML file of the form: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <root> <foo/> <subfoo/> <bar/> <subbar/> </root>
Created attachment 203428 [details] Proposed changes and test
Fixed in AnnotationsProcessor. Checked in to 2.3.1 and 2.4
*** Bug 355544 has been marked as a duplicate of this bug. ***
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink