wsdl file paths contain spaces generates MalformedURLException on Sun JDK 
1.5.0_06
----------------------------------------------------------------------------------

                 Key: MOJO-697
                 URL: http://jira.codehaus.org/browse/MOJO-697
             Project: Mojo
          Issue Type: Bug
          Components: axistools
         Environment: Windows XP with SP2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Maven 2.0.5
axistools version:  1.1-SNAPSHOT
            Reporter: Thai Ha
         Attachments: debug.txt, testproject.zip

On JDK 1.5.0_06, if the file path to WSDL file contains spaces, an exception 
MalformedURLException  will be thrown. The stack trace is included in attached 
debug.txt file (Note: This exception may not happen on other versions of JDK).

The reason for this exception is because the file path 'd:\app 
path\my-app\src\main\wsdl\partner.wsdl' is used in the call
new  URL("d:\app path\my-app\src\main\wsdl\partner.wsdl") inside Axis code. And 
on some JRE versions, this call may fail. But this is not a JRE or Axis defect 
because Axis expects the path to WSDL file is an URI string. So the axistool 
plugin should pass an URI string to Axis, not an absolute file path like in the 
current code :

File: 
axistools-maven-plugin\src\main\java\org\codehaus\mojo\axistools\wsdl2java\DefaultWSDL2JavaPlugin.java
Line: 293

wsdlWrapper.execute( generateWSDLArgumentList( wsdl.getAbsolutePath() ) );

This line of code should be changed to:

wsdlWrapper.execute( generateWSDLArgumentList( wsdl.toURI().toString() ) );

I tested and it worked correctly.

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

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to