[ 
https://issues.apache.org/jira/browse/CXF-3756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092085#comment-13092085
 ] 

Glen Mazza commented on CXF-3756:
---------------------------------

Oh.  I like #grammar then.

> 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

        

Reply via email to