castor
  1. castor
  2. CASTOR-2222

issue with generated castor mapping file when nested choice is used for castor.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Component/s: XML code generator
    • Labels:
      None
    • Number of attachments :
      2

      Description

      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

      1. Customers_V2 0 2.xsd
        306 kB
        aparajitha
      2. mapping.xml
        278 kB
        aparajitha

        Activity

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            aparajitha
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: