Axis2
  1. Axis2
  2. AXIS2-343

WSDL2Java fails during code gen for maxOccurs="1" minOccurs="1"

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Trying to get the wsdl in AXIS2-184 bug working with ADB, am getting the following exception.

      Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: org.apache.axis2.databinding.schema.SchemaCompilationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:104)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:30)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
      Caused by: java.lang.RuntimeException: org.apache.axis2.databinding.schema.SchemaCompilationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:122)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:75)
      ... 2 more
      Caused by: org.apache.axis2.databinding.schema.SchemaCompilationException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at org.apache.axis2.databinding.schema.writer.JavaBeanWriter.write(JavaBeanWriter.java:104)
      at org.apache.axis2.databinding.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:368)
      at org.apache.axis2.databinding.schema.SchemaCompiler.processSchema(SchemaCompiler.java:281)
      at org.apache.axis2.databinding.schema.SchemaCompiler.processElement(SchemaCompiler.java:225)
      at org.apache.axis2.databinding.schema.SchemaCompiler.process(SchemaCompiler.java:449)
      at org.apache.axis2.databinding.schema.SchemaCompiler.processParticle(SchemaCompiler.java:418)
      at org.apache.axis2.databinding.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:343)
      at org.apache.axis2.databinding.schema.SchemaCompiler.processSchema(SchemaCompiler.java:281)
      at org.apache.axis2.databinding.schema.SchemaCompiler.processElement(SchemaCompiler.java:225)
      at org.apache.axis2.databinding.schema.SchemaCompiler.processElement(SchemaCompiler.java:204)
      at org.apache.axis2.databinding.schema.SchemaCompiler.compile(SchemaCompiler.java:139)
      at org.apache.axis2.databinding.schema.SchemaCompiler.compile(SchemaCompiler.java:100)
      at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:103)
      ... 3 more
      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(Unknown Source)
      at org.apache.axis2.databinding.schema.writer.JavaBeanWriter.process(JavaBeanWriter.java:215)
      at org.apache.axis2.databinding.schema.writer.JavaBeanWriter.write(JavaBeanWriter.java:99)
      ... 15 more

      Thanks,
      dims

      1. DLDataService.wsdl
        29 kB
        Davanum Srinivas

        Activity

        Hide
        Davanum Srinivas added a comment -

        Command line used:

        java org.apache.axis2.wsdl.WSDL2Java -d adb -o work -s -p samples.perf2 -t -ss -sd -uri DLDataService.wsdl

        Show
        Davanum Srinivas added a comment - Command line used: java org.apache.axis2.wsdl.WSDL2Java -d adb -o work -s -p samples.perf2 -t -ss -sd -uri DLDataService.wsdl
        Hide
        Ajith Harshana Ranabahu added a comment -

        The cause of this issue is a scoping problem in the code generators element handling. It is fixed now but needs a bit of testing before closing down the issue

        Show
        Ajith Harshana Ranabahu added a comment - The cause of this issue is a scoping problem in the code generators element handling. It is fixed now but needs a bit of testing before closing down the issue
        Hide
        Ajith Harshana Ranabahu added a comment -

        Done. There has been enough testing to show that this is no longer an issue

        Show
        Ajith Harshana Ranabahu added a comment - Done. There has been enough testing to show that this is no longer an issue

          People

          • Assignee:
            Ajith Harshana Ranabahu
            Reporter:
            Davanum Srinivas
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development