You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by "Graham Turrell (JIRA)" <ji...@apache.org> on 2006/11/16 00:36:37 UTC

[jira] Created: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

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


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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Updated: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Graham Turrell (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WODEN-90?page=all ]

Graham Turrell updated WODEN-90:
--------------------------------

    Attachment: Woden90Patch.txt

> 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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Commented: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Jeremy Hughes (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WODEN-90?page=comments#action_12450380 ] 
            
Jeremy Hughes commented on WODEN-90:
------------------------------------

I had a recent similar problem. The best way to do this AFAIK is

file.toURI().toURL()

which gives a URL with the correct characters escaped. See [1] 

[1] http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Commented: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Lawrence Mandel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WODEN-90?page=comments#action_12451071 ] 
            
Lawrence Mandel commented on WODEN-90:
--------------------------------------

Is there a reason the ValdiateWSDL20 Ant task accepts a file path and not a URL? Is this an Ant convention/requirement? If the ValidateWSDL20 task has simply been written to accept a file path perhaps it should be changed to accept a URL.

My concern is really around the maintenance of code that will take any file path and convert it into a correct URL. This type of routine can quickly get out of hand as anyone with any path will expect that the routine will satisfy them. With multiple platforms and ways of structuring file paths there are many ways the file path may be structured when passed to Woden and it will be difficult for Woden to convert correctly in every case.

> 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
>         Assigned To: Arthur Ryman
>         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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Commented: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Graham Turrell (JIRA)" <ji...@apache.org>.
    [ 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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Commented: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Graham Turrell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WODEN-90?page=comments#action_12450892 ] 
            
Graham Turrell commented on WODEN-90:
-------------------------------------

Lawrence,

I agree that we should not be about correcting invalid URL's in Woden. However, a couple of points for this case:
Firstly this isn't exactly a correction since ValidateWSDL20.execute() doesnt purport to accept a URL, but a filepath. Therfore we are dealing with a conversion to a URI not a correction. Secondly , it is the resulting URI that is passed into WSDLReader.readSWDL( ...). If one regards that method call as Woden then we would indeed be doing the conversion (in ValidateWSDL20) before passing to Woden (WSDLReader).

I don't know if that completely addresses your concerns though?

> 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
>         Assigned To: Arthur Ryman
>         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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Commented: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Lawrence Mandel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WODEN-90?page=comments#action_12452320 ] 
            
Lawrence Mandel commented on WODEN-90:
--------------------------------------

I don't think this one fix is a maintenance problem. I do think that taking on the responsibility to convert all file paths into valid URLs is a maintenance problem. 

In this case Woden will only convert the file paths from the Ant task so I think we're alright as the only client that we need to support is the Woden Ant client. I'll withdraw my previous -1 vote on this Jira.

Also, given when Arthur stated about the Ant filesets, I think the Woden Ant task needs to support the common Ant structures and use them as expected by clients. Otherwise we risk alienating users that can't figure out how to pass in files to the Woden Ant task.

> 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
>         Assigned To: Arthur Ryman
>         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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Assigned: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Arthur Ryman (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WODEN-90?page=all ]

Arthur Ryman reassigned WODEN-90:
---------------------------------

    Assignee: Arthur Ryman

> 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
>         Assigned To: Arthur Ryman
>         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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Closed: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Arthur Ryman (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/WODEN-90?page=all ]

Arthur Ryman closed WODEN-90.
-----------------------------

    Resolution: Fixed

Applied Graham Turrell's patch in r475958. Thx.

> 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
>         Assigned To: Arthur Ryman
>         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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Commented: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Lawrence Mandel (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WODEN-90?page=comments#action_12450867 ] 
            
Lawrence Mandel commented on WODEN-90:
--------------------------------------

I'm -1 on this type of URL correction being performed in Woden as I don't think Woden should get into the business of trying to correct invalid URLs/URIs/IRIs that it is given to parse. We got into a lot of maintenance trouble going down this path with our WTP validators and I know the Xerces team had similar problems in early versions of Xerces.

I suggest that we require clients to pass in valid URLs to Woden. This does place the burden of correcting invalid URLs on the client but they are in the best position to know what corrections may be necessary for their particular usage.

> 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
>         Assigned To: Arthur Ryman
>         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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Commented: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Graham Turrell (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WODEN-90?page=comments#action_12451388 ] 
            
Graham Turrell commented on WODEN-90:
-------------------------------------

ValidateWSDL20 is an Ant Task class and as such its execute() method is passed, according to its interface,  a regular expression matching a set of filenames (in this case the test xml files being validated). That regexp is defined inthe build.xml task definition "validatewsdl20". I don;t think there is a way of getting from this list of xml files in directories to file:// URLs without doing the conversion we're talking about. The class concerned has always done such a conversion (although previous to this JIRA could not cope with filepaths containing whitespace.

I think your main concern is non-portability of filepath representation between OSes and its one I share. However in this case it seems Ant is handling portability issues transparently: Ant generates the file list according to the filesystem & OS on which it is run; provided the ValidateWSDL20 class runs on the same system as the invoking Ant , then the filepath notation is guarenteed consistent between them. Since we never deal explicitly with filepath strings, there shouldnt' be maintenance issues here.

> 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
>         Assigned To: Arthur Ryman
>         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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org


[jira] Commented: (WODEN-90) org.apache.woden.ant.validateWSDL20 mis-handles paths including whitespace

Posted by "Arthur Ryman (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/WODEN-90?page=comments#action_12452312 ] 
            
Arthur Ryman commented on WODEN-90:
-----------------------------------

Lawrence/Graham,

The execute method is not passed a regex of file paths. However, if you inherit from the appropriate class, the task acquires the ability to process FileSets which are a key Ant structure. They are defined by includes and excludes.

Ant is primarily a build technology, therefore it majors on processing sets of files.

However, you can define addition parameters, so I could extend it to accept a) a url, b) a file that contained a list of urls. These would be passed directly to Woden. But I do think the use of the fix:

String wsdlLoc = file.toURI().toString(); 

is fine.

Lawrence - why do you think this is a maintenance problem?

> 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
>         Assigned To: Arthur Ryman
>         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: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org