Hi
i have used castor maven plugin 2.0-alpha1 to generate the classes for the xsd. Using the generated classes i have generated mapping file from mapping tool.
In my xsd...
<xs:complexType name="AffiliationType">
<xs:sequence>
<xs:element name="Name" type="xs:string" minOccurs="0"/>
<xs:element name="Description" type="xs:string" minOccurs="0"/>
<xs:element name="Relationship" type="xs:string" minOccurs="0"/>
<xs:element name="AffiliationType" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
<xs:choice maxOccurs="unbounded">
<xs:element name="RetailStoreID" type="xs:string"/>
<xs:element name="PartyID" type="xs:string"/>
<xs:element name="CustomerID" type="xs:string"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="Action" type="AffiliationActionType"/>
<xs:attribute name="UpdateType" type="CustomerUpdateType" use="optional" default="Existing"/>
<xs:attribute name="PrimaryFlag" type="xs:boolean" use="optional" default="true"/>
</xs:complexType>
the classes with respect to nested choice are generated properly. But in the mapping file for the corresponding element (AffiliationTypeChoice) "error-if-this-is-used" is mapped.
<bind-xml name="AffiliationType" node="element"/>
<field name="affiliationTypeChoice" type="com.wsgc.blueprint.phase0.prototype.atp.schema.AffiliationTypeChoice" required="true"><bind-xml name<b>="error-if-this-is-used" </b>node="element"/>
</field></class>
i have attached mapping file and xsd for your refernce.
need ur help soon
thanks in advance
aparvatala