Axis2
  1. Axis2
  2. AXIS2-5244

WSDL2Java Tool generates the SchemaCompilationException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: 1.6.1
    • Fix Version/s: None
    • Component/s: adb
    • Labels:
      None
    • Environment:
      Windows XP, Axis2 Version - 1.6.1, Java Version - 1.6.0.20

      Description

      We are using the WSDL2Java tool to generate the client side stubs but we are encountering the SchemaCompilationException. Following is the stack trace of the exception that we are getting

      Exception Stack Trace —
      _____________________

      C:\Projects\OCBC_New\CBS-AcctDepStaticBal-I\Services\CBS-AcctDepStaticBal-I\WSDL
      >%AXIS2_HOME%\bin\WSDL2Java -uri CBS-AcctDepStaticBal-I-ConcreteHTTP.wsdl -p com
      .avaya.ept.ocbc.acctdepstaticbal -d adb -s -o build\client
      Using AXIS2_HOME: C:\Softwares\axis2-1.6.1-bin\axis2-1.6.1
      Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_20
      Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
      Retrieving document at 'CBS-AcctDepStaticBal-I-ConcreteHTTP.wsdl'.
      Retrieving schema at '../Schemas/XML/CBS-AcctDepStaticBal-I-ServiceEnvelope.xsd'
      , relative to 'file:/C:/Projects/OCBC_New/CBS-AcctDepStaticBal-I/Services/CBS-Ac
      ctDepStaticBal-I/WSDL/CBS-AcctDepStaticBal-I-ConcreteHTTP.wsdl'.
      Retrieving schema at 'CBS-AcctDepStaticBal-I.xsd', relative to 'file:/C:/Project
      s/OCBC_New/CBS-AcctDepStaticBal-I/Services/CBS-AcctDepStaticBal-I/Schemas/XML/CB
      S-AcctDepStaticBal-I-ServiceEnvelope.xsd'.
      Retrieving schema at '../../../../Schemas/XML/AccountAggregates.xsd', relative t
      o 'file:/C:/Projects/OCBC_New/CBS-AcctDepStaticBal-I/Services/CBS-AcctDepStaticB
      al-I/Schemas/XML/CBS-AcctDepStaticBal-I.xsd'.
      Retrieving schema at 'CollateralElements.xsd', relative to 'file:/C:/Projects/OC
      BC_New/CBS-AcctDepStaticBal-I/Schemas/XML/AccountAggregates.xsd'.
      Retrieving schema at 'PaymentElements.xsd', relative to 'file:/C:/Projects/OCBC_
      New/CBS-AcctDepStaticBal-I/Schemas/XML/AccountAggregates.xsd'.
      Retrieving schema at 'SubAccountElements.xsd', relative to 'file:/C:/Projects/OC
      BC_New/CBS-AcctDepStaticBal-I/Schemas/XML/AccountAggregates.xsd'.
      Retrieving schema at 'FXAggregates.xsd', relative to 'file:/C:/Projects/OCBC_New
      /CBS-AcctDepStaticBal-I/Schemas/XML/AccountAggregates.xsd'.
      Retrieving schema at 'FXElements.xsd', relative to 'file:/C:/Projects/OCBC_New/C
      BS-AcctDepStaticBal-I/Schemas/XML/FXAggregates.xsd'.
      Retrieving schema at 'CommonAggregates.xsd', relative to 'file:/C:/Projects/OCBC
      _New/CBS-AcctDepStaticBal-I/Schemas/XML/AccountAggregates.xsd'.
      Retrieving schema at 'AccountAggregates.xsd', relative to 'file:/C:/Projects/OCB
      C_New/CBS-AcctDepStaticBal-I/Schemas/XML/CommonAggregates.xsd'.
      Retrieving schema at 'AccountElements.xsd', relative to 'file:/C:/Projects/OCBC_
      New/CBS-AcctDepStaticBal-I/Schemas/XML/CommonAggregates.xsd'.
      Retrieving schema at 'CommonElements.xsd', relative to 'file:/C:/Projects/OCBC_N
      ew/CBS-AcctDepStaticBal-I/Schemas/XML/CommonAggregates.xsd'.
      Retrieving schema at 'AccountElements.xsd', relative to 'file:/C:/Projects/OCBC_
      New/CBS-AcctDepStaticBal-I/Schemas/XML/AccountAggregates.xsd'.
      Retrieving schema at 'CreditCardElements.xsd', relative to 'file:/C:/Projects/OC
      BC_New/CBS-AcctDepStaticBal-I/Schemas/XML/AccountAggregates.xsd'.
      Retrieving schema at 'FXElements.xsd', relative to 'file:/C:/Projects/OCBC_New/C
      BS-AcctDepStaticBal-I/Schemas/XML/AccountAggregates.xsd'.
      Retrieving schema at 'CommonElements.xsd', relative to 'file:/C:/Projects/OCBC_N
      ew/CBS-AcctDepStaticBal-I/Schemas/XML/AccountAggregates.xsd'.
      Retrieving schema at '../../../../Schemas/XML/AccountElements.xsd', relative to
      'file:/C:/Projects/OCBC_New/CBS-AcctDepStaticBal-I/Services/CBS-AcctDepStaticBal
      -I/Schemas/XML/CBS-AcctDepStaticBal-I.xsd'.
      Retrieving schema at '../../../../Schemas/XML/CommonAggregates.xsd', relative to
      'file:/C:/Projects/OCBC_New/CBS-AcctDepStaticBal-I/Services/CBS-AcctDepStaticBa
      l-I/Schemas/XML/CBS-AcctDepStaticBal-I.xsd'.
      Retrieving schema at '../../../../Schemas/XML/CommonElements.xsd', relative to '
      file:/C:/Projects/OCBC_New/CBS-AcctDepStaticBal-I/Services/CBS-AcctDepStaticBal-
      I/Schemas/XML/CBS-AcctDepStaticBal-I.xsd'.
      Retrieving schema at '../../../../Schemas/XML/CommonHeader.xsd', relative to 'fi
      le:/C:/Projects/OCBC_New/CBS-AcctDepStaticBal-I/Services/CBS-AcctDepStaticBal-I/
      Schemas/XML/CBS-AcctDepStaticBal-I-ServiceEnvelope.xsd'.
      Retrieving schema at '../../../../Schemas/XML/CommonBody.xsd', relative to 'file
      :/C:/Projects/OCBC_New/CBS-AcctDepStaticBal-I/Services/CBS-AcctDepStaticBal-I/Sc
      hemas/XML/CBS-AcctDepStaticBal-I-ServiceEnvelope.xsd'.
      Retrieving schema at 'CommonHeader.xsd', relative to 'file:/C:/Projects/OCBC_New
      /CBS-AcctDepStaticBal-I/Schemas/XML/CommonBody.xsd'.
      Retrieving schema at 'CommonElements.xsd', relative to 'file:/C:/Projects/OCBC_N
      ew/CBS-AcctDepStaticBal-I/Schemas/XML/CommonBody.xsd'.
      log4j:WARN No appenders could be found for logger (org.apache.axis2.description.
      WSDL11ToAllAxisServicesBuilder).
      log4j:WARN Please initialize the log4j system properly.
      Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
      : java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
      ationEngine.java:293)
      at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
      at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
      Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExcepti
      on
      at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp
      leDBExtension.java:53)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
      ationEngine.java:246)
      ... 2 more
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp
      leDBExtension.java:50)
      ... 3 more
      Caused by: org.apache.axis2.schema.SchemaCompilationException: The referenced el
      ement '

      {http://schemas.ocbc.com/soa/emf/common/aggregates}

      CustomerID' was not fo
      und!
      at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.
      java:752)
      at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.
      java:603)
      at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:20
      63)
      at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler
      .java:1946)
      at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompi
      ler.java:1155)
      at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaT
      ype(SchemaCompiler.java:1054)
      at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.j
      ava:1008)
      at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.
      java:644)
      at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.
      java:614)
      at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:42
      2)
      at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:38
      1)
      at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:38
      1)
      at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:40
      6)
      at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:29
      1)
      at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java
      :102)
      ... 8 more

      1. CBS-AcctDepStaticBal-I.zip
        132 kB
        Sumeet Chakraborty

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        158d 18h 57m 1 Sagara Gunathunga 17/Jul/12 08:42
        Hide
        Ralf Hauser added a comment -

        See also AXIS2-5595 - I doubt that this is "not a problem"

        Show
        Ralf Hauser added a comment - See also AXIS2-5595 - I doubt that this is "not a problem"
        Sagara Gunathunga made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.6.1 [ 12316466 ]
        Resolution Not A Problem [ 8 ]
        Hide
        Sagara Gunathunga added a comment -

        org.apache.axis2.schema.SchemaCompilationException: The referenced element '

        {http://schemas.ocbc.com/soa/emf/common/aggregates}

        CustomerID' was not found!

        Make sure "CustomerID" element available on http://schemas.ocbc.com/soa/emf/common/aggregates namespace. Provided zip file contains large number of XSDs and we don't have time to go through each of them to find the issues. If you can isolate this issue reopen with a simple WSDL/XSD.

        Show
        Sagara Gunathunga added a comment - org.apache.axis2.schema.SchemaCompilationException: The referenced element ' {http://schemas.ocbc.com/soa/emf/common/aggregates} CustomerID' was not found! Make sure "CustomerID" element available on http://schemas.ocbc.com/soa/emf/common/aggregates namespace. Provided zip file contains large number of XSDs and we don't have time to go through each of them to find the issues. If you can isolate this issue reopen with a simple WSDL/XSD.
        Hide
        Sumeet Chakraborty added a comment -

        All the Services specific schema's, common schema's and the WSDL have been uploaded in a zip file (CBS-AcctDepStaticBal-I.zip). Once you extract the zip file the WSDL can be located under Services\CBS-AcctDepStaticBal-I\WSDL.

        Show
        Sumeet Chakraborty added a comment - All the Services specific schema's, common schema's and the WSDL have been uploaded in a zip file (CBS-AcctDepStaticBal-I.zip). Once you extract the zip file the WSDL can be located under Services\CBS-AcctDepStaticBal-I\WSDL.
        Sumeet Chakraborty made changes -
        Field Original Value New Value
        Attachment CBS-AcctDepStaticBal-I.zip [ 12513953 ]
        Sumeet Chakraborty created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Sumeet Chakraborty
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development