Hi Todd, You also have to add <structure map-as="com.purdueefcu.statements.processor.bean.Share"> in the mappings for com.purdueefcu.statements.processor.bean.Savings & com.purdueefcu.statements.processor.bean.Checking. The position of the structure element determines where the elements from the base class are going to show up in a marshalled xml.
More info at http://jibx.sourceforge.net/tutorial/binding-mappings.html in the Mappings and inheritance section. regards Varghese Todd Nine wrote: > Hi all, > I have the following mapping. Whenever a concrete share is > rendered, the fields on the abstract mapping are ignored. As a > result, I only get about 20% of the fields I need. Since an abstract > mapping can't have a tag name, I'm assuming I must reference the > parent somehow. Any help would be greatly appreciated in getting this > resolved. I have also included my output to illustrate the issue. > > > <mapping class="com.purdueefcu.statements.processor.bean.Statement" > name="Statement"> > <value name="startDate" field="startDate" /> > <value name="endDate" field="endDate" /> > <value name="accountNumber" field="accountNumber" /> > <value name="name" field="name" /> > <structure field="emailInfo" /> > <collection field="shares"> > > </collection> > </mapping> > > <!--Abstract share mapping. All child shares should extend this > mapping since it maps 70%+ of the attributes--> > <mapping class="com.purdueefcu.statements.processor.bean.Share" > abstract="true"> > <value name="suffix" field="suffix" /> > <value name="description" field="description" /> > <value name="beginningBalance" field="beginningBalance" /> > <value name="totalDeposits" field="totalDeposits" /> > <value name="totalWithdrawals" field="totalWithdrawals" /> > <value name="endingBalance" field="endingBalance" /> > <!--TODO Once we're done with initial prototyping remove > flexible = true to make sure we've mapped all our sub classes > The error with marshalling an unmapped class usually > appears as a ClassCastException--> > <collection field="transactions"></collection> > </mapping> > > <!--Savings mapping, should extend Share bindings--> > <mapping class="com.purdueefcu.statements.processor.bean.Savings" > name="Savings" > extends="com.purdueefcu.statements.processor.bean.Share"> > <value name="apy" field="apy" /> > <value name="apye" field="apye" /> > <value name="dividendsEarned" field="dividendsEarned" /> > <value name="ytdDividends" field="ytdDividends" /> > </mapping> > > <mapping class="com.purdueefcu.statements.processor.bean.Checking" > name="Checking" > extends="com.purdueefcu.statements.processor.bean.Share"> > <value name="maintServiceCharge" field="maintServiceCharge" /> > <value name="serviceCharges" field="serviceCharges" /> > <value name="draftsCleared" field="draftsCleared" /> > </mapping> > > Output > > <Statement> > <startDate>2007-06-18T19:59:11.039Z</startDate> > <endDate>2007-06-18T19:59:11.039Z</endDate> > <accountNumber>12345</accountNumber> > <name>John Q Member</name> > <EmailInfo> > <address>[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]></address> > <subject>Test subject</subject> > <message>testmessage</message> > <from>[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]></from> > </EmailInfo> > <Savings> > <apy>0.03</apy> > <apye>0.03</apye> > <dividendsEarned> 2.50</dividendsEarned> > <ytdDividends>2.50</ytdDividends> > </Savings> > <Checking> > <maintServiceCharge>0.00</maintServiceCharge> > <serviceCharges> 10.00</serviceCharges> > <draftsCleared>10</draftsCleared> > </Checking> > </Statement> > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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