Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4315

wsdl2java code generator not enabled to handle wsdl and schema files provided in a directory that contains a space

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.1
    • None
    • wsdl
    • None
    • The bug has been identified when executing "wsdl2java" out of Apache Axis2 release 1.4.1 on a Windows operating system (here Windows Vista Ultimate 64, using a Sun JVM 1.6.0_12 64bit)

    Description

      When locating:

      • WSDL
      • corresponding XML Schema

      in a directory whose name contains a white space character (here "test 2"), "wsdl2java" generates the following error stacktrace:

      C:\test 2>wsdl2java -o c:\temp -S source -p de.king.wsclient --noBuildXML -uri WorkItemPublishing-2.0.0.wsdl
      Using AXIS2_HOME: C:\Program Files\axis2-1.4.1
      Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_12
      Retrieving document at 'WorkItemPublishing-2.0.0.wsdl'.
      Retrieving schema at 'WorkItemPublishing-2.0.0.xsd', relative to 'file:/C:/test 2/WorkItemPublishing-2.0.0.wsdl'.
      Retrieving schema at 'Common-2.0.0.xsd', relative to 'file:/C:/test 2/WorkItemPublishing-2.0.0.xsd'.
      [ERROR] java.net.URISyntaxException: Illegal character in path at index 13: file:/C:/test 2/WorkItemPublishing-2.0.0.wsdl
      java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 13: file:/C:/test 2/WorkItemPublishing-2.0.0.wsdl
      at org.apache.ws.commons.schema.resolver.DefaultURIResolver.resolveEntity(DefaultURIResolver.java:63)
      at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1814)
      at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1863)
      at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1581)
      at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:186)
      at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:412)
      at org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WSDLToAxisServiceBuilder.java:144)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibleElements(WSDL11ToAxisServiceBuilder.java:2320)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:414)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:403)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:347)
      at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      Caused by: java.net.URISyntaxException: Illegal character in path at index 13: file:/C:/test 2/WorkItemPublishing-2.0.0.wsdl
      at java.net.URI$Parser.fail(URI.java:2809)
      at java.net.URI$Parser.checkChars(URI.java:2982)
      at java.net.URI$Parser.parseHierarchical(URI.java:3066)
      at java.net.URI$Parser.parse(URI.java:3014)
      at java.net.URI.<init>(URI.java:578)
      at org.apache.ws.commons.schema.resolver.DefaultURIResolver.resolveEntity(DefaultURIResolver.java:57)
      ... 14 more
      Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:153)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      Caused by: org.apache.axis2.AxisFault: java.net.URISyntaxException: Illegal character in path at index 13: file:/C:/test 2/WorkItemPublishing-2.0.0.wsdl
      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:397)
      at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
      ... 2 more
      Caused by: java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 13: file:/C:/test 2/WorkItemPublishing-2.0.0.wsdl
      at org.apache.ws.commons.schema.resolver.DefaultURIResolver.resolveEntity(DefaultURIResolver.java:63)
      at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1814)
      at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1863)
      at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1581)
      at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:186)
      at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:412)
      at org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WSDLToAxisServiceBuilder.java:144)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibleElements(WSDL11ToAxisServiceBuilder.java:2320)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:414)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:403)
      at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:347)
      ... 4 more
      Caused by: java.net.URISyntaxException: Illegal character in path at index 13: file:/C:/test 2/WorkItemPublishing-2.0.0.wsdl
      at java.net.URI$Parser.fail(URI.java:2809)
      at java.net.URI$Parser.checkChars(URI.java:2982)
      at java.net.URI$Parser.parseHierarchical(URI.java:3066)
      at java.net.URI$Parser.parse(URI.java:3014)
      at java.net.URI.<init>(URI.java:578)
      at org.apache.ws.commons.schema.resolver.DefaultURIResolver.resolveEntity(DefaultURIResolver.java:57)
      ... 14 more
      C:\test 2>

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kih1fe Holger King
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: