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

Bug 334933

Summary: Root level enumerations fail to marshal in JAXB
Product: z_Archived Reporter: Matt MacIvor <matt.macivor>
Component: EclipselinkAssignee: Matt MacIvor <matt.macivor>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed fix and test case none

Description Matt MacIvor CLA 2011-01-20 13:15:46 EST
Create a context from an enumeration class. Wrap the enum in a JAXBElement and try to marshal. EclipseLink will fail to marshal due to a missing descriptor for the enumeration class.

EclipseLink needs to generate a wrapper class for all enumerations in order to handle them as root-level objects wrapped in JAXB Element. 

This can be triggered using a similar mechanism to what's used for binary types (byte[] etc).
Comment 1 Matt MacIvor CLA 2011-01-20 14:21:13 EST
Created attachment 187230 [details]
proposed fix and test case
Comment 2 Matt MacIvor CLA 2011-01-20 17:07:19 EST
Attached patch checked in to SVN
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:04:54 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink