Axis2
  1. Axis2
  2. AXIS2-2682

Axis2 cannot generate WSI example code

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Ubuntu 7.04. Tried with JDK 1.4, 1.5 and 1.6

      Description

      I tried to generate the WSI Supply Chain example with Axis2 but when I tried to generate the Manufacturer service I got the following error message:

      [generation] Retrieving document at 'Configuration.wsdl', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/'.
      [generation] Retrieving schema at 'Configuration.xsd', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/Configuration.wsdl'.
      [generation] Retrieving schema at 'http://schemas.xmlsoap.org/soap/envelope/', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/Configuration.xsd'.
      [generation] Retrieving schema at 'ManufacturerSN.xsd', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/'.
      [generation] Retrieving schema at 'ManufacturerPO.xsd', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/'.
      [generation] Retrieving schema at 'Configuration.xsd', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/'.
      [generation] Retrieving document at 'Configuration.wsdl', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/'.
      [generation] Retrieving schema at 'Configuration.xsd', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/Configuration.wsdl'.
      [generation] Retrieving schema at 'http://schemas.xmlsoap.org/soap/envelope/', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/Configuration.xsd'.
      [generation] Retrieving schema at 'ManufacturerSN.xsd', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/'.
      [generation] Retrieving schema at 'ManufacturerPO.xsd', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/'.
      [generation] Retrieving schema at 'Configuration.xsd', relative to 'file:/home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/wsdl/'.
      [generation] 17-may-2007 14:18:16 org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
      [generation] INFO: Resolving schema with publicId http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd and systemId [Configuration.xsd]
      [generation] 17-may-2007 14:18:16 org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
      [generation] INFO: Resolving schema with publicId http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerPO.xsd and systemId [ManufacturerPO.xsd]
      [generation] 17-may-2007 14:18:16 org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
      [generation] INFO: Resolving schema with publicId http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-10/ManufacturerSN.xsd and systemId [ManufacturerSN.xsd]
      [generation] 17-may-2007 14:18:16 org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver resolveEntity
      [generation] INFO: Resolving schema with publicId http://schemas.xmlsoap.org/soap/envelope/ and systemId [http:/schemas.xmlsoap.org/soap/envelope]

      BUILD FAILED
      /home/jasanchez/workspaces/workspace_wsi_axis2/wsi-manufacturer/build.xml:65: org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for ConfigurationFaultMessage!
      at org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:326)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      at org.apache.tools.ant.Task.perform(Task.java:364)
      at org.apache.tools.ant.Target.execute(Target.java:341)
      at org.apache.tools.ant.Target.performTasks(Target.java:369)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
      at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
      Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for ConfigurationFaultMessage!
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:256)
      at org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:324)
      ... 11 more
      Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for ConfigurationFaultMessage!
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1281)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:238)
      ... 12 more
      Caused by: java.lang.RuntimeException: Element QName is null for ConfigurationFaultMessage!
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultParamElements(AxisServiceBasedMultiLanguageEmitter.java:2617)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultElement(AxisServiceBasedMultiLanguageEmitter.java:2554)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2118)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2024)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForSkeletonInterface(AxisServiceBasedMultiLanguageEmitter.java:1981)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeSkeletonInterface(AxisServiceBasedMultiLanguageEmitter.java:1890)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1235)
      ... 13 more
      — Nested Exception —
      org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for ConfigurationFaultMessage!
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:256)
      at org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:324)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      at org.apache.tools.ant.Task.perform(Task.java:364)
      at org.apache.tools.ant.Target.execute(Target.java:341)
      at org.apache.tools.ant.Target.performTasks(Target.java:369)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
      at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
      Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for ConfigurationFaultMessage!
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1281)
      at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:238)
      ... 12 more
      Caused by: java.lang.RuntimeException: Element QName is null for ConfigurationFaultMessage!
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultParamElements(AxisServiceBasedMultiLanguageEmitter.java:2617)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultElement(AxisServiceBasedMultiLanguageEmitter.java:2554)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2118)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2024)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForSkeletonInterface(AxisServiceBasedMultiLanguageEmitter.java:1981)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeSkeletonInterface(AxisServiceBasedMultiLanguageEmitter.java:1890)
      at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1235)
      ... 13 more

      Total time: 15 seconds

      I was using the ant task to generate the code with xmlbeans binding. I send the wsdls I'm using in the attached file.

        Activity

        Hide
        Venkatesh Valakonda added a comment -

        Hi Amila,

        I am also facing this problem. Can you please help me if there is any workaround for this?

        Thanks & Regards
        Venkatesh

        Show
        Venkatesh Valakonda added a comment - Hi Amila, I am also facing this problem. Can you please help me if there is any workaround for this? Thanks & Regards Venkatesh
        Hide
        Deepal Jayasinghe added a comment -

        Amila please go through this and see whether you have any updates ?

        -Deepal

        Show
        Deepal Jayasinghe added a comment - Amila please go through this and see whether you have any updates ? -Deepal
        Hide
        Sergey Vladimirov added a comment -

        half a year later - still not fixed.
        Does anyone have any ideas how to fix it or work around?

        I need to fix it and have some time to do that, but i'm pretty new with Axis 2 code.

        Show
        Sergey Vladimirov added a comment - half a year later - still not fixed. Does anyone have any ideas how to fix it or work around? I need to fix it and have some time to do that, but i'm pretty new with Axis 2 code.
        Davanum Srinivas made changes -
        Fix Version/s 1.3 [ 12312476 ]
        Amila Chinthaka Suriarachchi made changes -
        Priority Blocker [ 1 ] Critical [ 2 ]
        Hide
        Amila Chinthaka Suriarachchi added a comment -

        Axis2 Still not support header faults. So downgrade this to fix in a future release

        Show
        Amila Chinthaka Suriarachchi added a comment - Axis2 Still not support header faults. So downgrade this to fix in a future release
        Davanum Srinivas made changes -
        Fix Version/s 1.3 [ 12312476 ]
        Davanum Srinivas made changes -
        Assignee Ajith Harshana Ranabahu [ ajith ] Amila Chinthaka Suriarachchi [ amilachinthaka ]
        Hide
        Ajith Harshana Ranabahu added a comment -

        AFAIR we did not implement this. We did get the soap headers working but not the soap header faults. This is what we discussed in the hackathon and ultimately what is going to be in the code. (this seems to be something we cannot leave out since its WS-I BP)

        1. Generate code in the stub that takes the soap fault detail from the header rather than the body. This has to be done in the stub since it is the one that has the knowledge of the WSDL when generated. One complication here is that the header and the namespace that needs to be handled correctly.

        2. Obviously the user will have no difference in the interface that he sees through the stub.

        Show
        Ajith Harshana Ranabahu added a comment - AFAIR we did not implement this. We did get the soap headers working but not the soap header faults. This is what we discussed in the hackathon and ultimately what is going to be in the code. (this seems to be something we cannot leave out since its WS-I BP) 1. Generate code in the stub that takes the soap fault detail from the header rather than the body. This has to be done in the stub since it is the one that has the knowledge of the WSDL when generated. One complication here is that the header and the namespace that needs to be handled correctly. 2. Obviously the user will have no difference in the interface that he sees through the stub.
        Eran Chinthaka made changes -
        Assignee Amila Chinthaka Suriarachchi [ amilachinthaka ] Ajith Harshana Ranabahu [ ajith ]
        Hide
        Eran Chinthaka added a comment -

        Ajith,

        I can remember we talked about Header faults sometime back. Can not remember whether you implemented that or not. Can you please help with this?

        Thanks

        Show
        Eran Chinthaka added a comment - Ajith, I can remember we talked about Header faults sometime back. Can not remember whether you implemented that or not. Can you please help with this? Thanks
        Hide
        Amila Chinthaka Suriarachchi added a comment -

        the problem with this wsdl is it contain a soapheaderfault element
        does Axis2 support this type of constructs?
        <soap:header message="tns:SNSubmit" part="ConfigurationHeader" use="literal">
        <soap:headerfault message="cfg:ConfigurationFaultMessage" part="ConfigurationFault" use="literal"/>
        </soap:header>

        Show
        Amila Chinthaka Suriarachchi added a comment - the problem with this wsdl is it contain a soapheaderfault element does Axis2 support this type of constructs? <soap:header message="tns:SNSubmit" part="ConfigurationHeader" use="literal"> <soap:headerfault message="cfg:ConfigurationFaultMessage" part="ConfigurationFault" use="literal"/> </soap:header>
        Hide
        Davanum Srinivas added a comment -

        We need to get WSI Example Scenarios working for 1.3

        thanks,
        dims

        Show
        Davanum Srinivas added a comment - We need to get WSI Example Scenarios working for 1.3 thanks, dims
        Davanum Srinivas made changes -
        Priority Major [ 3 ] Blocker [ 1 ]
        Davanum Srinivas made changes -
        Assignee Amila Rathnayake [ amila ] Amila Chinthaka Suriarachchi [ amilachinthaka ]
        Davanum Srinivas made changes -
        Assignee Amila Rathnayake [ amila ]
        Jose Antonio made changes -
        Field Original Value New Value
        Attachment Manufacturer.zip [ 12357535 ]
        Hide
        Jose Antonio added a comment -

        The WSDL and XSD files involved in code generation.

        Show
        Jose Antonio added a comment - The WSDL and XSD files involved in code generation.
        Jose Antonio created issue -

          People

          • Assignee:
            Amila Chinthaka Suriarachchi
            Reporter:
            Jose Antonio
          • Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Development