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

Bug 327784

Summary: oxm XML file does not support the use of xml-access-methods, read-only, or write-only on xml-element-ref(s)
Product: z_Archived Reporter: Paul Fullbright <paul.fullbright>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david.twelves, eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Supporting tests none

Description Paul Fullbright CLA 2010-10-14 10:27:24 EDT
Not sure if this is a bug, or an enhancement.

xml-access-methods, read-only, and write-only are implemented for *most* MOXy attribute mappings, but not for xml-element or xml-elements.  One would think they would also apply there.
Comment 1 David McCann CLA 2010-10-14 10:40:51 EDT
Hey Paul,

xml-access-methods, read-only, and write-only are configurable for xml-element and xml-elements via XML metadata file or directly on the XMLModel classes.  

I assume from the bug title that you mean xml-element-ref and xml-element-refs.  :-)
Comment 2 Paul Fullbright CLA 2010-10-14 10:43:26 EDT
Yep.  Words are starting to look the same to me.  :)
Comment 3 David McCann CLA 2010-10-26 11:28:22 EDT
Created attachment 181739 [details]
Proposed fix
Comment 4 David McCann CLA 2010-10-26 11:28:35 EDT
Created attachment 181740 [details]
Supporting tests
Comment 5 David McCann CLA 2010-10-26 11:44:30 EDT
Note that accessors and read/write flags set on an XmlElementRef are ignored when  it is wrapped by an XmlElementRef(s).

Fix checked in.

Reviewed by:  rick.barkhouse@oracle.com
Tests:  all unit tests pass as expected
        jaxb/externalizedmetadata/xmlelementref/XmlElementRefTestCases
        jaxb/externalizedmetadata/xmlelementrefs/XmlElementRefsTestCases
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:28:20 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink