You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Patrick Paulson (JIRA)" <ji...@apache.org> on 2011/08/23 18:13:29 UTC
[jira] [Commented] (AXIS2-4598) WSDL2Java fails when wsdl is a file
with a space in the pathname
[ https://issues.apache.org/jira/browse/AXIS2-4598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089561#comment-13089561 ]
Patrick Paulson commented on AXIS2-4598:
----------------------------------------
This problem is still there on windows xp using wsdl2code 1.6.0. My first time here ... can this be reopened?
> WSDL2Java fails when wsdl is a file with a space in the pathname
> ----------------------------------------------------------------
>
> Key: AXIS2-4598
> URL: https://issues.apache.org/jira/browse/AXIS2-4598
> Project: Axis2
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.4.1
> Reporter: Michael Thome
>
> 1. if the WSDL spec passed to WSDL2Java contains a space character, it is simply prefixed with a "file:/" and interpreted as a URI. This fails to construct a valid URI when the filesystem pathname contains characters that may not appear in URIs:
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
> at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:153)
> ...
> Caused by: org.apache.axis2.AxisFault: java.net.URISyntaxException: Illegal character in path at index 40: file:/C:/Users/something or other/foo.wsdl
> at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:397)
> ...
> Caused by: java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 40: file:/C:/Users/something or other/foo.wsdl
> at org.apache.ws.commons.schema.resolver.DefaultURIResolver.resolveEntity(DefaultURIResolver.java:63)
> ...
> Caused by: java.net.URISyntaxException: Illegal character in path at index 40: file:/C:/Users/something or other/foo.wsdl
> ...
> at java.net.URI.<init>(URI.java:578)
> at org.apache.ws.commons.schema.resolver.DefaultURIResolver.resolveEntity(DefaultURIResolver.java:57)
> 2. the WSDL URI may be escaped as it is passed in (e.g. file:/C:/Users/something%20or%20other/foo.wsdl). This allows the process to proceed further, it fails to consider the possibility that the base name is HTTP escaped, resulting in an exception setting the WSDL base URI:
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
> at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:159)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
> at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> at java.lang.String.substring(String.java:1938)
> at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.getBaseURI(CodeGenerationEngine.java:341)
> at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:151)
> ... 2 more
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org