axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Thome (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-4598) WSDL2Java fails when wsdl is a file with a space in the pathname
Date Thu, 07 Jan 2010 20:23:54 GMT
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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message