Hi Marcus, You don't say what is actually failing for you, but you should be able to use the following type of structure and binding for this:
public class ChoiceData { private TypeAData aData; private TypeBData bData; private TypeCData cData; ... } public class TypeAData { ... <mapping abstract='true' class='ChoiceData' type-name='tns:choiceType' choice='true'> <structure field='aData'/> <structure field='bData'/> <structure field='cData'/> </mapping> <mapping class='TypeAData' name='typeA'> ... </mapping> Note that this uses an abstract <mapping> with a type-name to correspond to the <xsd:complexType>, and concrete <mapping>s with element names to correspond to the referenced <xsd:element>s. You could also embed the element bindings directly into the ChoiceData <mapping>, if this is the only place these elements are referenced. Hope that helps get you started, - Dennis Dennis M. Sosnoski SOA and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Marcus Bassermann wrote: > Hi all, > > I try a xsd:coice selection of complex types in connection with > axis2 unwrapped codegen to map. All attempts failed so far. Does someone > know a solution for this problem and cann supply an example for a > binding definition? > > > Thanks very much. > > > > Schema example: > > > <element name="doUpdate"> > <complexType> > <sequence> > <element name="updateItem" minOccurs="1" maxOccurs="1" type="choiceType"/> > </sequence> > </complexType> > </element> > > > <xsd:complexType name="choiceType> > <xsd:choice minOccurs="1" maxOccurs=1"> > <xsd:element ref="typeA"/> ( complexType ) > <xsd:element ref="typeB" /> > <xsd:element ref="typeC" /> > </xsd:choice> > </xsd:complexType> > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users