[ http://issues.apache.org/jira/browse/AXIS-1525?page=comments#action_66651 ] Michael Thome commented on AXIS-1525: -------------------------------------
There is still something wrong here (as of this morning's HEAD 1.2.1 source tree). Consider the following schema fragment: <xsd:group name="Expr"> <xsd:choice> <xsd:element name="or" type="Eor"/> <xsd:element name="not" type="Enot"/> <xsd:element ref="compare"/> </xsd:choice> </xsd:group> <xsd:complexType name="Eor"> <xsd:sequence> <xsd:group ref="Expr" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="Enot"> <xsd:sequence> <xsd:group ref="Expr" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> wsdl2java emits class definitions for Eand and Eor that have no data members at all, while Enot has members for each of Eor, Enot and compare. E.g. group cardinality != [1,1] is quietly dropped. Perhaps there is another way to do this, but 1.2RC3's wsdl2java wrote (IMHO) closer to correct looking classes, even with the group classes... Of course, serialization with these constructs was totally broken. BTW, in case it wasn't obvious, I'm trying to get axis codegen to work on any sort of schema that encodes standard boolean logic, e.g. <and><or><test1/><test2/></or><not><test3/></not></and> > xsd:group behavior is wrong > --------------------------- > > Key: AXIS-1525 > URL: http://issues.apache.org/jira/browse/AXIS-1525 > Project: Axis > Type: Bug > Components: Serialization/Deserialization > Versions: 1.2 Beta > Reporter: Steve Green > Fix For: 1.2.1 > Attachments: 1525.diff, SomeType.java, group.patch, groupgen.patch, > sample.wsdl, test.wsdl.groups.tar > > 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira