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

Bug 327593

Summary: oxm XML file does not support the use of xml-java-type-adapter with xml-element-ref(s)
Product: z_Archived Reporter: Paul Fullbright <paul.fullbright>
Component: EclipselinkAssignee: David McCann <david.mccann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: blaise.doughan, david.twelves, eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Bug Depends on: 332569    
Bug Blocks:    
Attachments:
Description Flags
Proposed fix for XmlElementRef
none
Supporting test cases for XmlElementRef
none
Proposed fix
none
Supporting tests none

Description Paul Fullbright CLA 2010-10-12 13:33:11 EDT
According to the javadocs for @XmlJavaTypeAdapter, it may be used with @XmlElementRef(s) (as well as with @XmlAttribute, @XmlElement(s), and @XmlAnyElement).

http://download.oracle.com/javase/6/docs/api/javax/xml/bind/annotation/XmlJavaTypeAdapter.html

The oxm XML metadata does not support this use, as xml-element-ref(s) elements have no xml-java-type-adapter elements as the others do.
Comment 1 Paul Fullbright CLA 2010-10-12 13:55:28 EDT
According to the spec section 8.9.8.2, it may also be used with @XmlAnyAttribute.
Comment 2 Paul Fullbright CLA 2010-10-12 13:59:15 EDT
Also (8.9.10.2) @XmlValue
Comment 3 David McCann CLA 2010-10-27 09:30:51 EDT
Will open separate bugs to track adapter use with XmlValue and XmlAnyAttribute.

XmlValue:  https://bugs.eclipse.org/bugs/show_bug.cgi?id=328822
XmlAnyAttribute:  https://bugs.eclipse.org/bugs/show_bug.cgi?id=328823
Comment 4 David McCann CLA 2010-11-01 08:30:24 EDT
Created attachment 182135 [details]
Proposed fix for XmlElementRef
Comment 5 David McCann CLA 2010-11-01 08:30:44 EDT
Created attachment 182136 [details]
Supporting test cases for XmlElementRef
Comment 6 David McCann CLA 2010-12-22 10:52:07 EST
Reviewed by:  matt.macivor@oracle.com
Tests:  all unit tests pass as expected;  jaxb/externalizedmetadata/xmladapter/XmlAdapterTestCases; jaxb/xmladapter/hexbinary/XmlAdapterHexBinaryTestCases
Revision: 8744
Comment 7 David McCann CLA 2010-12-22 10:54:40 EST
Updated/closed the wrong bug.  Reopening.
Comment 8 David McCann CLA 2010-12-23 12:41:08 EST
Created attachment 185780 [details]
Proposed fix
Comment 9 David McCann CLA 2010-12-23 12:41:22 EST
Created attachment 185781 [details]
Supporting tests
Comment 10 David McCann CLA 2010-12-23 12:46:13 EST
Reviewed by:  matt.macivor@oracle.com
Tests:  all unit tests pass as expected; jaxb/externalizedmetadata/xmladapter/XmlAdapterTestCases
Revision:  8749
Comment 11 Eclipse Webmaster CLA 2022-06-09 10:04:52 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 12 Eclipse Webmaster CLA 2022-06-09 10:09:23 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink