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="-error-if-this-is-used-" node="element"/> </field></class> i have attached mapping file and xsd for your refernce. need ur help soon thanks in advance aparvatala http://www.nabble.com/file/p14187123/Customers_V2%2B0%2B2.xsd Customers_V2+0+2.xsd http://www.nabble.com/file/p14187123/mapping.xml mapping.xml -- View this message in context: http://www.nabble.com/%22errro-if-this-is-used%22-is-generated-in-mapping-file-when-nested-choice-is-used-in-xsd.-tf4954300.html#a14187123 Sent from the Castor - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email