You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sébastien (JIRA)" <ji...@apache.org> on 2010/08/26 10:33:54 UTC

[jira] Created: (CXF-2959) XMLBeans - XmlBeansSchemaInitializer can't support http schema location

XMLBeans - XmlBeansSchemaInitializer can't support http schema location
-----------------------------------------------------------------------

                 Key: CXF-2959
                 URL: https://issues.apache.org/jira/browse/CXF-2959
             Project: CXF
          Issue Type: Improvement
          Components: OtherDatabindings
    Affects Versions: 2.2.6
            Reporter: Sébastien


I'm trying to import schema thanks to full qualified names like these:

    <xsd:import namespace="http://www.myCompany.com/sf/scheduler/core"
            schemaLocation="http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd"/>
    <xsd:import namespace="http://www.myCompany.com/sf/execution/core"
            schemaLocation="http://www.myCompany.com/schemas/sf/execution/core-interface/execution-core.xsd"/>

Unfortunately, it tries to load the local file:

schemaorg_apache_xmlbeans/src/http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd


Is there a way to configure an XmlSchemaCatalog avoiding to load the schema from the net ? so the schema is in fact in: schemaorg_apache_xmlbeans\src\com\myCompany\sf\scheduler\core\scheduler-core.xsd

So I would like to create a mapping between the HTTP URL and the local XSD file

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


[jira] Updated: (CXF-2959) XMLBeans - XmlBeansSchemaInitializer can't support http schema location

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-2959:
-----------------------------

    Fix Version/s: 2.3.0

> XMLBeans - XmlBeansSchemaInitializer can't support http schema location
> -----------------------------------------------------------------------
>
>                 Key: CXF-2959
>                 URL: https://issues.apache.org/jira/browse/CXF-2959
>             Project: CXF
>          Issue Type: Improvement
>          Components: OtherDatabindings
>    Affects Versions: 2.2.6
>            Reporter: Sébastien
>            Assignee: Daniel Kulp
>             Fix For: 2.3.0, 2.2.11
>
>         Attachments: BsbXmlBeansDataBinding.java, BsbXmlBeansSchemaInitializer.java
>
>
> Currently CXF doesn't seem to support schema localized on the web. For instance if a schema have imports like these:
>     <xsd:import namespace="http://www.myCompany.com/sf/scheduler/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd"/>
>     <xsd:import namespace="http://www.myCompany.com/sf/execution/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/execution/core-interface/execution-core.xsd"/>
> CXF tries to load the local file:
> schemaorg_apache_xmlbeans/src/http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd
> Moreover, it could be interesting to support an XML schema catalog avoiding to load the schema from the net. In that way the upper URL could be mapped to the following local file: schemaorg_apache_xmlbeans\src\com\myCompany\sf\scheduler\core\scheduler-core.xsd

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


[jira] Commented: (CXF-2959) XMLBeans - XmlBeansSchemaInitializer can't support http schema location

Posted by "Stephane Nicoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920124#action_12920124 ] 

Stephane Nicoll commented on CXF-2959:
--------------------------------------

Hi Daniel,

This issue is missing the 2.3.0 fix version.

Thanks

> XMLBeans - XmlBeansSchemaInitializer can't support http schema location
> -----------------------------------------------------------------------
>
>                 Key: CXF-2959
>                 URL: https://issues.apache.org/jira/browse/CXF-2959
>             Project: CXF
>          Issue Type: Improvement
>          Components: OtherDatabindings
>    Affects Versions: 2.2.6
>            Reporter: Sébastien
>            Assignee: Daniel Kulp
>             Fix For: 2.2.11
>
>         Attachments: BsbXmlBeansDataBinding.java, BsbXmlBeansSchemaInitializer.java
>
>
> Currently CXF doesn't seem to support schema localized on the web. For instance if a schema have imports like these:
>     <xsd:import namespace="http://www.myCompany.com/sf/scheduler/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd"/>
>     <xsd:import namespace="http://www.myCompany.com/sf/execution/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/execution/core-interface/execution-core.xsd"/>
> CXF tries to load the local file:
> schemaorg_apache_xmlbeans/src/http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd
> Moreover, it could be interesting to support an XML schema catalog avoiding to load the schema from the net. In that way the upper URL could be mapped to the following local file: schemaorg_apache_xmlbeans\src\com\myCompany\sf\scheduler\core\scheduler-core.xsd

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


[jira] Updated: (CXF-2959) XMLBeans - XmlBeansSchemaInitializer can't support http schema location

Posted by "Sébastien (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sébastien updated CXF-2959:
---------------------------

    Description: 
Currently CXF doesn't seem to support schema localized on the web. For instance if a schema have imports like these:

    <xsd:import namespace="http://www.myCompany.com/sf/scheduler/core"
            schemaLocation="http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd"/>
    <xsd:import namespace="http://www.myCompany.com/sf/execution/core"
            schemaLocation="http://www.myCompany.com/schemas/sf/execution/core-interface/execution-core.xsd"/>

CXF tries to load the local file:

schemaorg_apache_xmlbeans/src/http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd


Moreover, it could be interesting to support an XML schema catalog avoiding to load the schema from the net. In that way the upper URL could be mapped to the following local file: schemaorg_apache_xmlbeans\src\com\myCompany\sf\scheduler\core\scheduler-core.xsd

  was:
I'm trying to import schema thanks to full qualified names like these:

    <xsd:import namespace="http://www.myCompany.com/sf/scheduler/core"
            schemaLocation="http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd"/>
    <xsd:import namespace="http://www.myCompany.com/sf/execution/core"
            schemaLocation="http://www.myCompany.com/schemas/sf/execution/core-interface/execution-core.xsd"/>

Unfortunately, it tries to load the local file:

schemaorg_apache_xmlbeans/src/http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd


Is there a way to configure an XmlSchemaCatalog avoiding to load the schema from the net ? so the schema is in fact in: schemaorg_apache_xmlbeans\src\com\myCompany\sf\scheduler\core\scheduler-core.xsd

So I would like to create a mapping between the HTTP URL and the local XSD file


> XMLBeans - XmlBeansSchemaInitializer can't support http schema location
> -----------------------------------------------------------------------
>
>                 Key: CXF-2959
>                 URL: https://issues.apache.org/jira/browse/CXF-2959
>             Project: CXF
>          Issue Type: Improvement
>          Components: OtherDatabindings
>    Affects Versions: 2.2.6
>            Reporter: Sébastien
>
> Currently CXF doesn't seem to support schema localized on the web. For instance if a schema have imports like these:
>     <xsd:import namespace="http://www.myCompany.com/sf/scheduler/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd"/>
>     <xsd:import namespace="http://www.myCompany.com/sf/execution/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/execution/core-interface/execution-core.xsd"/>
> CXF tries to load the local file:
> schemaorg_apache_xmlbeans/src/http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd
> Moreover, it could be interesting to support an XML schema catalog avoiding to load the schema from the net. In that way the upper URL could be mapped to the following local file: schemaorg_apache_xmlbeans\src\com\myCompany\sf\scheduler\core\scheduler-core.xsd

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


[jira] Issue Comment Edited: (CXF-2959) XMLBeans - XmlBeansSchemaInitializer can't support http schema location

Posted by "Sébastien (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907926#action_12907926 ] 

Sébastien edited comment on CXF-2959 at 9/10/10 4:02 AM:
---------------------------------------------------------

I've created a patch allowing to use an XmlCatalog before resolving schema locations.


This is a sample catalog:

<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="uri">
    <rewriteURI uriStartString="http://www.myCompany.com/schemas/"
                rewritePrefix="classpath:schemaorg_apache_xmlbeans/src/com/myCompany"/>
</catalog>


In that way, when one of our schema is encountered, we guess that it has been included by  XmlBeans in a JAR.

      was (Author: sebge2):
    I've created a patch allowing to use an XmlCatalog before resolving schema locations.


This is a sample catalog:

<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="uri">

    <!--We consider that every schema imported in web services have an XmlBeans counterpart.-->
    <rewriteURI uriStartString="http://www.myCompany.com/schemas/"
                rewritePrefix="classpath:schemaorg_apache_xmlbeans/src/com/myCompany"/>
</catalog>


In that way, when one of our schema is encountered, we guess that it has been included by  XmlBeans in a JAR.
  
> XMLBeans - XmlBeansSchemaInitializer can't support http schema location
> -----------------------------------------------------------------------
>
>                 Key: CXF-2959
>                 URL: https://issues.apache.org/jira/browse/CXF-2959
>             Project: CXF
>          Issue Type: Improvement
>          Components: OtherDatabindings
>    Affects Versions: 2.2.6
>            Reporter: Sébastien
>         Attachments: BsbXmlBeansDataBinding.java, BsbXmlBeansSchemaInitializer.java
>
>
> Currently CXF doesn't seem to support schema localized on the web. For instance if a schema have imports like these:
>     <xsd:import namespace="http://www.myCompany.com/sf/scheduler/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd"/>
>     <xsd:import namespace="http://www.myCompany.com/sf/execution/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/execution/core-interface/execution-core.xsd"/>
> CXF tries to load the local file:
> schemaorg_apache_xmlbeans/src/http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd
> Moreover, it could be interesting to support an XML schema catalog avoiding to load the schema from the net. In that way the upper URL could be mapped to the following local file: schemaorg_apache_xmlbeans\src\com\myCompany\sf\scheduler\core\scheduler-core.xsd

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


[jira] Assigned: (CXF-2959) XMLBeans - XmlBeansSchemaInitializer can't support http schema location

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-2959:
--------------------------------

    Assignee: Daniel Kulp

> XMLBeans - XmlBeansSchemaInitializer can't support http schema location
> -----------------------------------------------------------------------
>
>                 Key: CXF-2959
>                 URL: https://issues.apache.org/jira/browse/CXF-2959
>             Project: CXF
>          Issue Type: Improvement
>          Components: OtherDatabindings
>    Affects Versions: 2.2.6
>            Reporter: Sébastien
>            Assignee: Daniel Kulp
>         Attachments: BsbXmlBeansDataBinding.java, BsbXmlBeansSchemaInitializer.java
>
>
> Currently CXF doesn't seem to support schema localized on the web. For instance if a schema have imports like these:
>     <xsd:import namespace="http://www.myCompany.com/sf/scheduler/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd"/>
>     <xsd:import namespace="http://www.myCompany.com/sf/execution/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/execution/core-interface/execution-core.xsd"/>
> CXF tries to load the local file:
> schemaorg_apache_xmlbeans/src/http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd
> Moreover, it could be interesting to support an XML schema catalog avoiding to load the schema from the net. In that way the upper URL could be mapped to the following local file: schemaorg_apache_xmlbeans\src\com\myCompany\sf\scheduler\core\scheduler-core.xsd

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


[jira] Resolved: (CXF-2959) XMLBeans - XmlBeansSchemaInitializer can't support http schema location

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2959.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.11


I've incoporated the changes in your initializer into the base class.  Thanks!

> XMLBeans - XmlBeansSchemaInitializer can't support http schema location
> -----------------------------------------------------------------------
>
>                 Key: CXF-2959
>                 URL: https://issues.apache.org/jira/browse/CXF-2959
>             Project: CXF
>          Issue Type: Improvement
>          Components: OtherDatabindings
>    Affects Versions: 2.2.6
>            Reporter: Sébastien
>            Assignee: Daniel Kulp
>             Fix For: 2.2.11
>
>         Attachments: BsbXmlBeansDataBinding.java, BsbXmlBeansSchemaInitializer.java
>
>
> Currently CXF doesn't seem to support schema localized on the web. For instance if a schema have imports like these:
>     <xsd:import namespace="http://www.myCompany.com/sf/scheduler/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd"/>
>     <xsd:import namespace="http://www.myCompany.com/sf/execution/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/execution/core-interface/execution-core.xsd"/>
> CXF tries to load the local file:
> schemaorg_apache_xmlbeans/src/http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd
> Moreover, it could be interesting to support an XML schema catalog avoiding to load the schema from the net. In that way the upper URL could be mapped to the following local file: schemaorg_apache_xmlbeans\src\com\myCompany\sf\scheduler\core\scheduler-core.xsd

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


[jira] Updated: (CXF-2959) XMLBeans - XmlBeansSchemaInitializer can't support http schema location

Posted by "Sébastien (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sébastien updated CXF-2959:
---------------------------

    Attachment: BsbXmlBeansDataBinding.java
                BsbXmlBeansSchemaInitializer.java

I've created a patch allowing to use an XmlCatalog before resolving schema locations.


This is a sample catalog:

<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="uri">

    <!--We consider that every schema imported in web services have an XmlBeans counterpart.-->
    <rewriteURI uriStartString="http://www.myCompany.com/schemas/"
                rewritePrefix="classpath:schemaorg_apache_xmlbeans/src/com/myCompany"/>
</catalog>


In that way, when one of our schema is encountered, we guess that it has been included by  XmlBeans in a JAR.

> XMLBeans - XmlBeansSchemaInitializer can't support http schema location
> -----------------------------------------------------------------------
>
>                 Key: CXF-2959
>                 URL: https://issues.apache.org/jira/browse/CXF-2959
>             Project: CXF
>          Issue Type: Improvement
>          Components: OtherDatabindings
>    Affects Versions: 2.2.6
>            Reporter: Sébastien
>         Attachments: BsbXmlBeansDataBinding.java, BsbXmlBeansSchemaInitializer.java
>
>
> Currently CXF doesn't seem to support schema localized on the web. For instance if a schema have imports like these:
>     <xsd:import namespace="http://www.myCompany.com/sf/scheduler/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd"/>
>     <xsd:import namespace="http://www.myCompany.com/sf/execution/core"
>             schemaLocation="http://www.myCompany.com/schemas/sf/execution/core-interface/execution-core.xsd"/>
> CXF tries to load the local file:
> schemaorg_apache_xmlbeans/src/http://www.myCompany.com/schemas/sf/scheduler/core/scheduler-core.xsd
> Moreover, it could be interesting to support an XML schema catalog avoiding to load the schema from the net. In that way the upper URL could be mapped to the following local file: schemaorg_apache_xmlbeans\src\com\myCompany\sf\scheduler\core\scheduler-core.xsd

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