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/08/23 15:09:29 UTC
[jira] [Created] (CXF-3756) wadl2java ignores multiple inline XML
schemas
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
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
[jira] [Commented] (CXF-3756) wadl2java ignores multiple inline XML
schemas
Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Commented] (CXF-3756) wadl2java ignores multiple inline XML
schemas
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092077#comment-13092077 ]
Sergey Beryozkin commented on CXF-3756:
---------------------------------------
Hi Glen, yes I was thinking about "#types", but assumed that convention came from the fact that in WSDL a 'types' container tag is used to group
schemas, in WADL - it's a grammar tag, so for the moment I'd like to name it as "#grammars" - just to align it with WADL's application:grammar.
We can easily switch it to #types
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
[jira] [Commented] (CXF-3756) wadl2java ignores multiple inline XML
schemas
Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Resolved] (CXF-3756) wadl2java ignores multiple inline XML
schemas
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Closed] (CXF-3756) wadl2java ignores multiple inline XML
schemas
Posted by "metatech (JIRA)" <ji...@apache.org>.
[ 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