| Summary: | Schema gen with package that references another uses wrong schema name | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Paul Fullbright <paul.fullbright> | ||||||||||||||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||||||||
| Severity: | normal | ||||||||||||||||||||
| Priority: | P3 | CC: | david.mccann, david.twelves, neil.hauge, tranle1 | ||||||||||||||||||
| Version: | unspecified | ||||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||||
| OS: | Windows Vista | ||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||
Forwarding this bug to the MOXy dev group. It appears that the MOXy generator is not using the result of the method createOutput(String, String) to create the content of test.org.xsd, but it is using directly the suggested fileName (schema0.xsd). I have tested these classes with the Metro implementation, and schemaLocation is set properly to test2.org.xsd Created attachment 186785 [details]
Generated test.org.xsd from MOXy
Created attachment 186787 [details]
Generated test.org.xsd from Metro implementation
Created attachment 186788 [details]
Dali createOutput(String, String) method
This is a bug in our schema generator after all. After reviewing the API for the output resolver, we should be relativizing the returned system ID and not using it as an absolute path. "a Result object that encapsulates the actual destination of the schema. If the Result object has a system ID, it must be an absolute system ID. Those system IDs are relativized by the caller and used for <xs:import> statements." Note - the latest SchemaGenerator code uses the system ID if set, which is better than the behavior described in this bug, but this will need to be relativized to be correct. Created attachment 195379 [details]
Proposed fix.
Created attachment 195380 [details]
Supporting test case.
Created attachment 195413 [details]
Proposed fix v2
Created attachment 195414 [details]
Supporting test cases.
Reviewed by: blaise.doughan@oracle.com Tests: all unit tests pass as expected; SchemaGenImportTestCases Revision: 9361 The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Created attachment 186511 [details] included source Using the source attached, two schemas are generated (test.org.xsd and test2.org.xsd - this can't be changed in the current mechanism), but the import in the first schema refers to schema0.xsd and not test2.org.xsd.