Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336998 - Issue with @XmlAttachmentRef with @XmlElement
Summary: Issue with @XmlAttachmentRef with @XmlElement
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Matt MacIvor CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 14:11 EST by Matt MacIvor CLA
Modified: 2022-06-09 10:06 EDT (History)
0 users

See Also:


Attachments
Fix part 1 (4.77 KB, patch)
2011-02-11 14:30 EST, Matt MacIvor CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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