You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "metatech (JIRA)" <ji...@apache.org> on 2011/09/21 13:53:09 UTC
[jira] [Closed] (CXF-3756) wadl2java ignores multiple inline XML
schemas
[ https://issues.apache.org/jira/browse/CXF-3756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
metatech closed CXF-3756.
-------------------------
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