[
https://issues.apache.org/jira/browse/CXF-3756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Beryozkin resolved CXF-3756.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.5
2.4.3
Assignee: Sergey Beryozkin
I updated a code to append "#grammar1", "#grammar2", etc -
that will make it easier to refer to inlined schemas from jaxb binding files
thanks
> wadl2java ignores multiple inline XML schemas
> ---------------------------------------------
>
> Key: CXF-3756
> URL: https://issues.apache.org/jira/browse/CXF-3756
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.4.2
> Reporter: metatech
> Assignee: Sergey Beryozkin
> Fix For: 2.4.3, 2.5
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> When generating classes from a WADL, if multiple inline XML schemas are
> present in the file, they are ignored, only the last one is taken into
> account.
> This seems to happen because multiple schemas have the same SystemID, which
> are later parsed by the
> com.sun.tools.xjc.api.SchemaCompiler.parseSchema(String systemId, Element
> element) method, which documents that the SystemID should be made unique.
> I followed this advice and added the targetNamespace to the SystemID, and now
> classes for all schemas are generated.
> In method SourceGenerator.getSchemaElements(...)
> ======
> for (Element schemaEl : schemasEls) {
> String targetNS = schemaEl.getAttribute("targetNamespace");
> schemas.add(createSchemaInfo(schemaEl, app.getWadlPath() + "#" +
> targetNS));
> }
> Could you please apply this contribution if you think it makes sense.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira