Hello
I am trying to marshall java objects into an XML file.
My mapping file defines multiple collections.
Like
<class name="JobInfo">
<field name="CCList"
collection="collection"
type="CCList">
<bind-xml name="CCList" node="element"/>
</field>
<field name="QAMarksList"
collection="collection"
type="QAMarksList">
<bind-xml name="QAMarksList" node="element"/>
</field>
</class>
<class name="CCList">
<map-to xml="CCList"/>
<field name="CCItem"
type="CCValue"
collection="collection"
get-method="getCCList"
set-method="setCCList">
<bind-xml name="CCItem" node="element"/>
</field>
</class>
<!--
CC Class definition.
-->
<class name="CCValue">
<field name="StreetAddress1"
type="java.lang.String"
get-method="getAddress1"
set-method="setAddress1">
<bind-xml name="StreetAddress1" node="element" />
</field>
</class>
<class name="QAMarksList">
<map-to xml="QAMarksList"/>
<field name="QAMarksItem"
type="QAMarksValue"
collection="collection"
get-method="getQAMarksList"
set-method="setQAMarksList">
<bind-xml name="QAMarksItem" node="element"/>
</field>
</class>
<!--
QAMarks Class definition
-->
<class name="QAMarksValue" auto-complete="false">
<field name="AudioPosition"
type="java.lang.String"
get-method="getAudioPosition"
set-method="setAudioPosition">
<bind-xml name="AudioPosition" node="element" />
</field>
</class>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Now when I try to marshall an object that contains the
above two list objects, i get an error where the xml file
generated has both the lists with the same value objects
defined under it.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Original XML file
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<JobInfo>
<CCList>
<CCValue>
<StreetAddress1> 1 Tower Lane </StreetAddress1>
</CCValue>
<CCValue>
<StreetAddress1> 2 Tower Lane </StreetAddress1>
</CCValue>
<CCValue>
<StreetAddress1> 3 Tower Lane </StreetAddress1>
</CCValue>
</CCList>
<QAMarksList>
<QAMarksValue>
<AudioPosition>1</AudioPosition>
</QAMarksValue>
<QAMarksValue>
<AudioPosition>2</AudioPosition>
</QAMarksValue>
<QAMarksValue>
<AudioPosition>3</AudioPosition>
</QAMarksValue>
</QAMarksList>
</JobInfo>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Unmarshalled and then MARSHALLED FILE IS
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<JobInfo>
<CCList>
<CCValue>
<StreetAddress1> 1 Tower Lane </StreetAddress1>
</CCValue>
<CCValue>
<StreetAddress1> 2 Tower Lane </StreetAddress1>
</CCValue>
<CCValue>
<StreetAddress1> 3 Tower Lane </StreetAddress1>
</CCValue>
</CCList>
<QAMarksList>
<CCValue>
<StreetAddress1> 1 Tower Lane </StreetAddress1>
</CCValue>
<CCValue>
<StreetAddress1> 2 Tower Lane </StreetAddress1>
</CCValue>
<CCValue>
<StreetAddress1> 3 Tower Lane </StreetAddress1>
</CCValue>
</QAMarksList>
</JobInfo>
Please do tell me what is the solution to this error.
thanks in advance
sandip
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev