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

Bug 337721

Summary: schema gen for XmlAccessType.PROPERTY does not include annotated fields
Product: z_Archived Reporter: Karen Butzke <karenfbutzke>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: blaise.doughan, matt.macivor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Code to demonstrate the issue
none
propsed fix and tests none

Description Karen Butzke CLA 2011-02-21 09:24:40 EST
Using the following class I generated a schema using MOXy and the fields 'aPrivateField' and 'aPublicField' were not generated into the schema even though they are annotated fields. 

package test.propertyaccess;

@XmlType
@XmlAccessorType(XmlAccessType.PROPERTY)
public class A {

	@XmlAttribute
	private int aPrivateField;
	@XmlAttribute
	public String aPublicField;

	public String getAPublicProperty() {
		return null;
	}
	public void setAPublicProperty(String name) {
		
	}
	
	private String getAPrivateProperty() {
		return null;
	}
	private void setAPrivateProperty(String name) {
		
	}
}
Comment 1 Blaise Doughan CLA 2011-02-24 14:18:21 EST
Created attachment 189729 [details]
Code to demonstrate the issue
Comment 2 Matt MacIvor CLA 2011-03-16 15:43:47 EDT
Created attachment 191341 [details]
propsed fix and tests
Comment 3 Matt MacIvor CLA 2011-03-17 10:53:29 EDT
Attached patch checked in to SVN
Reviewed by Blaise Doughan
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:34:17 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink