Community
Participate
Working Groups
(found in head code) For the following example: @XmlType @XmlRootElement(name="FOO") public enum FooEnum { @XmlEnumValue("true") TRUE("TRUE!!!"); private final String value; private FooEnum(String value) { this.value = value; } } creating and marshalling a single FooEnum.TRUE should create a document of the form: <FOO>true</FOO> The RI does support this. Note also that the oxm.xsd does not allow for the configuration of either xml-type or xml-root-element on an xml-enum.
I should note that the exception logged by moxy in this case is: javax.xml.bind.MarshalException - with linked exception: [Exception [EclipseLink-25003] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.XMLMarshalException Exception Description: An error occurred marshalling the object Internal Exception: Exception [EclipseLink-25007] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.XMLMarshalException Exception Description: A descriptor for class testenum.FooEnum was not found in the project. For JAXB, if the JAXBContext was bootstrapped using TypeMappingInfo[] you must call a marshal method that accepts TypeMappingInfo as an input parameter.] ... This implies that @XmlType is being ignored as well, I think.
Created attachment 213074 [details] Proposed Fix and Test
Attached patch checked in to SVN in 2.3 and 2.4 streams
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink