Community
Participate
Working Groups
When an XmlElementRef is used with mixed or an XmlAnyElement, and the refs have a non-global scope, an exception like the following will occur: ------------------------------------------------------------ javax.xml.bind.JAXBException: Exception Description: Invalid XmlElementRef on property others on class org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmlanyelement.xmlelementrefs.FooImplNoAnnotations. Referenced Element not declared ------------------------------------------------------------ This is because in both cases we create an XMLAnyCollection mapping which will handle references for things that have default root elements, but non-global elements don't count as default roots.
Created attachment 196457 [details] Test Case demonstrating bug
Created attachment 203615 [details] proposed fix and test
Attached fix checked into 2.3.1 and trunk Reviewed by Blaise Doughan
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink