This needs to be asked on the jaxb list.   (jaxb.dev.java.net)   This code 
generation is per jaxb default spec,  but there may be an xjc plugin or 
something that simplifies this.

Dan


On Wed August 19 2009 11:06:11 am tpe wrote:
> It's even worse :). If t3 is of collection type, each element of that
> collection will become single element of the resulting
> List<JaxbElement<?>>. So, if for example t3 is a list with the size of 3,
> the final JaxbElement list will contain 5 elements.
>
> Lukasz Lichota wrote:
> > If I have complex type like this:
> > <xsd:sequence>
> >    <xsd:element name="n1" type="t1" />
> >    <xsd:element name="n2" type="t2" />
> >    <xsd:choice>
> >            <xsd:element name="n3" type="t3" />
> >            <xsd:element name="n4" type="t4" />
> >    </xsd:choice>
> > </xsd:sequence>
> >
> > then all this sequence is mapped to one field of type
> > List<JaxbElement<?>>,
> > why's that? can I force it to be mapped to two strongly typed fields plus
> > the choice mapped to JaxbElement<?> ?

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to