| Summary: | JAXB Externalized Metadata: Schema gen incorrect when setting XPath via XmlPath annotation | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | David McCann <david.mccann> | ||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Required in: 2.1 2.2 Created attachment 171958 [details]
Contains fix + test case mods for 2.2 stream
Created attachment 173858 [details]
Contains fix + test case mods
Fix checked into the 2.1 stream. Now both 2.2 and 2.1 contain this fix. Reviewed by: matt.macivor@oracle.com Tests: all unit tests pass as expected; jaxb/externalizedmetadata/mappings/direct/DirectMappingTestCases The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
The XPath set on the XmlPath annotation is not set properly such that schema generation will work properly. For example, if the following was set: @XmlAttribute @XmlPath("@id") public int empId; we would expect the following to be generated: <xsd:attribute name="id" type="xsd:int" use="required"/> but instead we get: <xsd:attribute name="empId" type="xsd:int" use="required"/> The fix should be done in AnnotationsProcessor.buildNewProperty(): we need to set the schemaName property on Property, as this value is used for the schema component name during schema generation.