[ 
http://issues.apache.org/jira/browse/WODEN-90?page=comments#action_12450396 ] 
            
Graham Turrell commented on WODEN-90:
-------------------------------------

OK. I guess my suggestion was because  in this case the ant task always creates 
the File objects from absolute paths, making the URI.toURL() (and the catching 
of a MalformedURLException) unnecessary. The patch I attached for String 
wsdlLoc = file.toURI().toString() does fix the problem in this context. It 
doesn't check for relative URI's but there are none in this context. However, 
"belt and braces" is a good policy. We probably need a trawling exercise to 
catch all such conversions in the woden codebase....
Unless anyone volunteers beforehand I'll look into both these issues 
post-interop.

The references are [1] and [2]

[1] http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#toURI()
[2]http://java.sun.com/j2se/1.4.2/docs/api/java/net/URI.html#toURL()


> org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace
> --------------------------------------------------------------------------
>
>                 Key: WODEN-90
>                 URL: http://issues.apache.org/jira/browse/WODEN-90
>             Project: Woden
>          Issue Type: Bug
>          Components: Validation
>            Reporter: Graham Turrell
>         Attachments: Woden90Patch.txt
>
>
> The ant-task "validatewsdl20" ( in ant-test/build.xml) is implemented by the 
> class (woden/src/)org.apache.woden.ant.validateWSDL20. This class includes 
> conversion of  local filenames  (testcase wsdl for the ant-tests) to String 
> representation of file:// URI's.
> The code segment in the execute() method is currently:
>            String wsdlLoc = file.getAbsolutePath(); 
>            wsdlLoc = wsdlLoc.replace('\\', '/');
>            wsdlLoc = "file:///" + wsdlLoc;
> This fails to convert any whitespace in the filepath to URI representation, 
> such that the resultant URI string is of the form file://<filepath with 
> whitespace>, which is an invalid URI.
> Replacing the above 3 lines with  
>            String wsdlLoc = file.toURI().toString();
> Should fix this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to