Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-1525

xsd:group behavior is wrong

    XMLWordPrintableJSON

Details

    Description

      WSDL2Java generates separate types for groups, and objects that reference groups end up with a children object. The problem is that serialization of that object should not show the group in XML. The elements of the group should appear on the wire as if they were elements of the referencing object.

      It seems that the problem might be fixable by changing the way in which WSDL2Java generates classes with groups. The bean writer could recurse in to groups and treat the elements as elements of the object being written. This might create problems when trying to properly handle xsd attributes like minOccurs=0, etc.. that appear on the group reference.

      Another possible solution would be to add some info to the type description so that the serialization could could recognize a group reference and do the right thing. The same would need to be true of the deserializer. This fix involves a change to the code generator as well as changes to the Axis engine.

      N O T E: I am interested in supplying a fix for this problem. Please comments on this issue so that I chose the method that best fits the design goals of the Axis developers.

      Attachments

        1. another.wsdl
          0.8 kB
          Michael Thome
        2. test.wsdl.groups.tar
          20 kB
          Steve Green
        3. 1525.diff
          7 kB
          Steve Green
        4. groupgen.patch
          4 kB
          Steve Green
        5. SomeType.java
          5 kB
          Steve Green
        6. sample.wsdl
          0.7 kB
          Steve Green
        7. group.patch
          3 kB
          Steve Green

        Activity

          People

            Unassigned Unassigned
            lagnat Steve Green
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: