Details
-
Bug
-
Status: Reopened
-
Major
-
Resolution: Unresolved
-
1.4.1
-
None
-
None
Description
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
Attachments
Issue Links
- duplicates
-
AXIS2-4315 wsdl2java code generator not enabled to handle wsdl and schema files provided in a directory that contains a space
- Resolved
- is duplicated by
-
AXIS2-4410 Illegal character in path at index 18: file:/c:/Documents and Settings/r...
- Resolved
- relates to
-
AXIS2-4315 wsdl2java code generator not enabled to handle wsdl and schema files provided in a directory that contains a space
- Resolved