Community
Participate
Working Groups
Given a class such as: public static class NormalizedString{ @XmlJavaTypeAdapter(NormalizedStringAdapter.class) private String normalized; } Eclispelink JAXB generates a schema definition missing the attribute. Eclipselink JAXB: <xsd:complexType name="normalizedString"/> Correct Schema: <xs:complexType name="normalizedString"> <xs:sequence> <xs:element name="normalized" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> Note there are correctly no public getters/setters and the member is private, but this is still handled by Sun JAXB due to the presence of the annotation. If we add the public accessors, this works for Eclipselink, but only apparently because it is ignoring the annotation. For Sun JAXB adding the public accessors leads to: Exception in thread "main" com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Class has two properties of the same name "normalized". So the public accessors should not be present.
Created attachment 191459 [details] Proposed Fix
Attached Patch checked in to SVN
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink