axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Thome (JIRA)" <>
Subject [jira] Commented: (AXIS-1525) xsd:group behavior is wrong
Date Wed, 01 Jun 2005 16:32:03 GMT
     [ ]
Michael Thome commented on AXIS-1525:

I've been looking at the code - serialization looks pretty straightforward, but deserialization
is going to be tough - off hand, I don't see a way to do it without serious structural changes
(dealing with ambiguities and pushing/popping group context(s)).

Strictly speaking, this is an issue of proper representation of model groups in general, and
not merely the xsd:group element. e.g. the codegen is also wrong for constructs like the following:

<definitions targetNamespace="urn:auth:bbn:com"
	  <xs:complexType name="YAT">
              <xs:choice maxOccurs="unbounded">
	        <xs:element name="a" type="xs:string"/>
	        <xs:element name="b" type="xs:string"/>

For correct representation, we'd need a class something like:
class YAT {
  Group1[] sequence;
  static class Group1 {
    String a,b;

> xsd:group behavior is wrong
> ---------------------------
>          Key: AXIS-1525
>          URL:
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2 Beta
>     Reporter: Steve Green
>      Fix For: 1.2.1
>  Attachments: 1525.diff,, another.wsdl, group.patch, groupgen.patch, sample.wsdl,
> 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:
For more information on JIRA, see:

View raw message