You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "William Tam (JIRA)" <ji...@apache.org> on 2010/03/19 19:44:27 UTC

[jira] Created: (CXF-2724) Relative schema location import fails on Windows machines

Relative schema location import fails on Windows machines
---------------------------------------------------------

                 Key: CXF-2724
                 URL: https://issues.apache.org/jira/browse/CXF-2724
             Project: CXF
          Issue Type: Bug
          Components: Resources
         Environment: Windows XP
            Reporter: William Tam
             Fix For: 2.3, 2.2.8


If I have a WSDL that imports a schema from a relation path such as below, it does not work in Windows.  
{code}
		<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
			<xsd:import namespace="urn:RelPath" schemaLocation="../schemas/configuration/bar.xsd">
			</xsd:import>
		</xsd:schema>
{code}

It is because of two issues in org.apache.cxf.resource.URIResolver.

1) URIResolver checks for baseUriStr.startsWith("file:/") but Windows file URI could be "file:C:/foo/bar"

2) URIResolver would include fragment (e.g. #type2) as file path when creates a File object.  This is not showing up as a problem in UNIX machines because "new URI(baseUriStr)" is able to parse the baseUriStr correctly.


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


[jira] Assigned: (CXF-2724) Relative schema location import fails on Windows machines

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

Willem Jiang reassigned CXF-2724:
---------------------------------

    Assignee: Willem Jiang

> Relative schema location import fails on Windows machines
> ---------------------------------------------------------
>
>                 Key: CXF-2724
>                 URL: https://issues.apache.org/jira/browse/CXF-2724
>             Project: CXF
>          Issue Type: Bug
>          Components: Resources
>         Environment: Windows XP
>            Reporter: William Tam
>            Assignee: Willem Jiang
>             Fix For: 2.3, 2.2.8
>
>         Attachments: CXF-2724.patch
>
>
> If I have a WSDL that imports a schema from a relation path such as below, it does not work in Windows.  
> {code}
> 		<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> 			<xsd:import namespace="urn:RelPath" schemaLocation="../schemas/configuration/bar.xsd">
> 			</xsd:import>
> 		</xsd:schema>
> {code}
> It is because of two issues in org.apache.cxf.resource.URIResolver.
> 1) URIResolver checks for baseUriStr.startsWith("file:/") but Windows file URI could be "file:C:/foo/bar"
> 2) URIResolver would include fragment (e.g. #type2) as file path when creates a File object.  This is not showing up as a problem in UNIX machines because "new URI(baseUriStr)" is able to parse the baseUriStr correctly.

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


[jira] Resolved: (CXF-2724) Relative schema location import fails on Windows machines

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

Willem Jiang resolved CXF-2724.
-------------------------------

    Resolution: Fixed

Applied patch into CXF trunk and 2.2.x branch with thanks to William.

> Relative schema location import fails on Windows machines
> ---------------------------------------------------------
>
>                 Key: CXF-2724
>                 URL: https://issues.apache.org/jira/browse/CXF-2724
>             Project: CXF
>          Issue Type: Bug
>          Components: Resources
>         Environment: Windows XP
>            Reporter: William Tam
>            Assignee: Willem Jiang
>             Fix For: 2.3, 2.2.8
>
>         Attachments: CXF-2724.patch
>
>
> If I have a WSDL that imports a schema from a relation path such as below, it does not work in Windows.  
> {code}
> 		<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> 			<xsd:import namespace="urn:RelPath" schemaLocation="../schemas/configuration/bar.xsd">
> 			</xsd:import>
> 		</xsd:schema>
> {code}
> It is because of two issues in org.apache.cxf.resource.URIResolver.
> 1) URIResolver checks for baseUriStr.startsWith("file:/") but Windows file URI could be "file:C:/foo/bar"
> 2) URIResolver would include fragment (e.g. #type2) as file path when creates a File object.  This is not showing up as a problem in UNIX machines because "new URI(baseUriStr)" is able to parse the baseUriStr correctly.

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


[jira] Updated: (CXF-2724) Relative schema location import fails on Windows machines

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

William Tam updated CXF-2724:
-----------------------------

    Attachment: CXF-2724.patch

Patch attached

> Relative schema location import fails on Windows machines
> ---------------------------------------------------------
>
>                 Key: CXF-2724
>                 URL: https://issues.apache.org/jira/browse/CXF-2724
>             Project: CXF
>          Issue Type: Bug
>          Components: Resources
>         Environment: Windows XP
>            Reporter: William Tam
>             Fix For: 2.3, 2.2.8
>
>         Attachments: CXF-2724.patch
>
>
> If I have a WSDL that imports a schema from a relation path such as below, it does not work in Windows.  
> {code}
> 		<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> 			<xsd:import namespace="urn:RelPath" schemaLocation="../schemas/configuration/bar.xsd">
> 			</xsd:import>
> 		</xsd:schema>
> {code}
> It is because of two issues in org.apache.cxf.resource.URIResolver.
> 1) URIResolver checks for baseUriStr.startsWith("file:/") but Windows file URI could be "file:C:/foo/bar"
> 2) URIResolver would include fragment (e.g. #type2) as file path when creates a File object.  This is not showing up as a problem in UNIX machines because "new URI(baseUriStr)" is able to parse the baseUriStr correctly.

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