Axis2
  1. Axis2
  2. AXIS2-4091

WSDL11ToAxisServiceBuilder + HTTP Binding: Unused/Useless global element declations are appended into WSDL's XSD documents

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.4, nightly
    • Fix Version/s: None
    • Component/s: kernel
    • Labels:
      None
    • Environment:
      Windows XP. 4GB RAM Intel Xeon dual-core @2.83Ghz

      Description

      Observed Behavior:
      1) New XML schema global elements declarations are created and appended into WSDL's XSD documents when they should not. This is the case of message <wsdl:part/>s already referencing global element declarations (through the 'element' attribute of the message part).

      2) Whether a message part requires a 'wrapped' element or not can be determine by reading the 'wrappedInput' and 'wrappedOutput' attributes of the 'BindingOperationEntry' inner class after the message part has been analyzed but the 'addPartToElement' method fails to properly set them for all cases (i.e. ignores whether the message part comes from an input or output message by ignoring the 'isOutMessage' argument received).

      Expected Behavior:
      1) No XML schema global elements declarations should be added whenever message <wsdl:part/>s use the 'element' attribute (i.e. already reference global element declarations).

      2) The 'addPartToElement' method should take into account the value of the 'isOutMessage' argument received to set the value of the 'wrappedInput' and 'wrappedOutput' attributes of the 'BindingOperationEntry' inner class.

      1. AXIS2-4091.patch
        2 kB
        Antonio Andrade
      2. AXIS2-4091-trunk.patch
        7 kB
        Matt Fluet
      3. JUnit Tests - Before.jpg
        34 kB
        Antonio Andrade
      4. JUnit Tests - Half of Patch.jpg
        36 kB
        Antonio Andrade

        Issue Links

          Activity

          Hide
          Antonio Andrade added a comment -

          This bug's priority is marked as Minor but its priority may easily increase due to the side-effects of creating new XML schema global element declarations as described in AXIS2-4071

          Show
          Antonio Andrade added a comment - This bug's priority is marked as Minor but its priority may easily increase due to the side-effects of creating new XML schema global element declarations as described in AXIS2-4071
          Hide
          Antonio Andrade added a comment -

          Submitting patch for Review:

          1) No XML schema global element declarations are appended to WSDL's XSD documents whenever message <wsdl:parts/>s are already referencing global element declarations.

          2) In the 'addPartToElement' method, the 'isOutMessage' argument received is now read to consistently set the value of the 'wrappedInput' and 'wrappedOutput' attributes.

          Show
          Antonio Andrade added a comment - Submitting patch for Review: 1) No XML schema global element declarations are appended to WSDL's XSD documents whenever message <wsdl:parts/>s are already referencing global element declarations. 2) In the 'addPartToElement' method, the 'isOutMessage' argument received is now read to consistently set the value of the 'wrappedInput' and 'wrappedOutput' attributes.
          Hide
          Antonio Andrade added a comment -

          Attaching screenshot of JUnit Tests results before the patch. The AxisService fails to be created.

          Show
          Antonio Andrade added a comment - Attaching screenshot of JUnit Tests results before the patch. The AxisService fails to be created.
          Hide
          Antonio Andrade added a comment -

          Attaching screenshot of JUnit Tests results AFTER the part 2 of the patch is fixed but BEFORE the part 1is included: AxisService is created but duplicated elements are found.

          Show
          Antonio Andrade added a comment - Attaching screenshot of JUnit Tests results AFTER the part 2 of the patch is fixed but BEFORE the part 1is included: AxisService is created but duplicated elements are found.
          Hide
          Antonio Andrade added a comment -

          Is there any chance for the patch to be reviewed and applied? Is there anything I can help with?

          Show
          Antonio Andrade added a comment - Is there any chance for the patch to be reviewed and applied? Is there anything I can help with?
          Hide
          Afkham Azeez added a comment -

          Antonio,
          I will be taking a look at this. As you may know, we are having a hackathon, and a lot of pending Axis2 issues are getting fixed. Will keep you updated. Thanks for the patch and sorry for the delay.

          Show
          Afkham Azeez added a comment - Antonio, I will be taking a look at this. As you may know, we are having a hackathon, and a lot of pending Axis2 issues are getting fixed. Will keep you updated. Thanks for the patch and sorry for the delay.
          Hide
          Antonio Andrade added a comment -

          When do you think this patch be reviewed and applied? The changes are relatively small.

          Show
          Antonio Andrade added a comment - When do you think this patch be reviewed and applied? The changes are relatively small.
          Hide
          Matt Fluet added a comment - - edited

          Updated patch with diff produced from axis2 1.6.2 tagged revisions (unit test code included with patch)

          Show
          Matt Fluet added a comment - - edited Updated patch with diff produced from axis2 1.6.2 tagged revisions (unit test code included with patch)
          Hide
          Sagara Gunathunga added a comment -

          I will take a look on your patches. Usually if a issue appear in the current trunk we first need to apply the patch to the trunk and then merge changes to other branches. If it's possible could please create these patches for current Axis2 trunk instead of tag version.

          Show
          Sagara Gunathunga added a comment - I will take a look on your patches. Usually if a issue appear in the current trunk we first need to apply the patch to the trunk and then merge changes to other branches. If it's possible could please create these patches for current Axis2 trunk instead of tag version.
          Hide
          Matt Fluet added a comment -

          Attached a patch generated from the trunk

          Show
          Matt Fluet added a comment - Attached a patch generated from the trunk

            People

            • Assignee:
              Afkham Azeez
              Reporter:
              Antonio Andrade
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development