You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Glen Mazza (JIRA)" <ji...@apache.org> on 2011/08/26 22:43:29 UTC
[jira] [Commented] (CXF-3756) wadl2java ignores multiple inline XML
schemas
[ https://issues.apache.org/jira/browse/CXF-3756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092021#comment-13092021 ]
Glen Mazza commented on CXF-3756:
---------------------------------
Unsure if I'm mixing apples and oranges here, but I wonder if it would be better to use the same naming standard already done by CXF's JAX-WS implementation (types1, types2, etc.) See: http://www.jroller.com/gmazza/entry/customizing_jaxb_artifacts#BindingFile. Not that big a deal, just mentioning it.
> 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