You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Benson Margulies (JIRA)" <ji...@apache.org> on 2008/12/14 22:27:44 UTC

[jira] Resolved: (WSCOMMONS-377) XmlSchemaCollection does not handle multiple imports correctly

     [ https://issues.apache.org/jira/browse/WSCOMMONS-377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies resolved WSCOMMONS-377.
----------------------------------------

    Resolution: Fixed

The 'fix' is as follows:

You can now give each schema a unique, synthetic, system ID. 

If the schema imports other schemata, they will be found based on the base of the collection, if the
collection has a base.


> XmlSchemaCollection does not handle multiple imports correctly
> --------------------------------------------------------------
>
>                 Key: WSCOMMONS-377
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-377
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: XmlSchema
>    Affects Versions: XmlSchema 1.4.3
>            Reporter: Alexander Veit
>            Assignee: Benson Margulies
>            Priority: Blocker
>             Fix For: XmlSchema 1.4.4
>
>         Attachments: wscommons-377.zip
>
>
> JAX-WS frequently generates WSDL files with the following schema import pattern:
> wsdl:
> {code:xml}
>   <types>
>     <xsd:schema>
>       <xsd:import namespace="http://test.example.org/" schemaLocation="http://server/path/?xsd=1" />
>     </xsd:schema>
>     <xsd:schema>
>       <xsd:import namespace="http://jaxb.dev.java.net/array" schemaLocation="http://server/path/?xsd=2" />
>     </xsd:schema>
>   </types>
> {code}
> xsd1:
> {code:xml}
> <xsd:schema xmlns:ns1="http://jaxb.dev.java.net/array" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://test.example.org/">
>   <xsd:import namespace="http://jaxb.dev.java.net/array" schemaLocation="http://server/path/?xsd=2" />
>  <!-- element definitions -->
> </xsd:schema>
> {code}
> xsd2:
> {code:xml}
> <xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://jaxb.dev.java.net/array">
>  <!-- type definitions -->
> </xsd:schema>
> {code}
> XMLSchema cannot read both schema imports in the WSDL. It quits with
> org.apache.ws.commons.schema.XmlSchemaException: Schema name conflict in collection. Namespace: 
> 	at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:139)
> 	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:412)
> CXF-1624 is probably related to this bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.