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

Bug 336998

Summary: Issue with @XmlAttachmentRef with @XmlElement
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
Fix part 1 none

Description Matt MacIvor CLA 2011-02-11 14:11:14 EST
If an @XmlAttachmentRef annotation is used on a DataHandler property that also has an @XmlElement annotation with a type specified.

The JAXB Reference Implementation seems to ignore the type specified on the XmlElement annotation in the case of XmlAttachmentRef. EclipseLink however changes the type of the property which invalidates the XmlAttachmentRef annotation (since it's only allowed on DataHandler properties). This will either lead to a validation exception, or to it being mapped with a DirectMapping and simply marshalling out the toString value of the DataHandler.
Comment 1 Matt MacIvor CLA 2011-02-11 14:30:34 EST
Created attachment 188811 [details]
Fix part 1
Comment 2 Matt MacIvor CLA 2011-02-14 11:33:05 EST
Attached patch checked in to SVN
Reviewed by David McCann
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:06:09 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink