axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maksim Selivanov (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (AXIS2-4598) WSDL2Java fails when wsdl is a file with a space in the pathname
Date Fri, 09 Aug 2013 22:28:48 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13735409#comment-13735409
] 

Maksim Selivanov edited comment on AXIS2-4598 at 8/9/13 10:28 PM:
------------------------------------------------------------------

Same with wsdl2code:
[ERROR] Failed to execute goal org.apache.axis2:axis2-wsdl2code-maven-plugin:1.6.2:wsdl2code
(Generate_Server_Code) on project epsos-ncp-pt-client-consumer: Error parsing WSDL: java.net.URISyntaxException:
Illegal character in path at index 17: file:/D:/Soft/New folder/OpenNCP/...
                
      was (Author: savemaxim):
    Same with wsdl2code:
[ERROR] Failed to execute goal org.apache.axis2:axis2-wsdl2code-maven-plugin:1.6.2:wsdl2code
(Generate_Server_Code) on project epsos-ncp-pt-client-consumer: Error parsing WSDL: java.net.URISyntaxException:
Illegal character in path at index 17: file:/D:/Soft/New folder/OpenNCP/
                  
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
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


Mime
View raw message