HI castor Users'

Here is my mapping file
**----------------------------------------------------------------------
--**
<mapping>
        <description>A mapping file for Transaction Data Response
application</description> 
        <class name="TransactionIdResponseCVO" >
                <map-to xml="TRANSACTION_ID_SERVICE_RESPONSE" />
                <field name="SERVICE_CONSUMER_ID" type="string"
required="true">
                        <bind-xml name="SERVICE_CONSUMER_ID"
location="HEADER"/>
                </field>
                <field name="SERVICE_NAME" type="string"
required="true">
                        <bind-xml name="SERVICE_NAME"
location="HEADER"/>
                </field>
            <field name="TransactionIdVO" type="TransactionIdResponseVO"
collection="collection">
                <bind-xml name="RESPONSES" location="BODY" />
                </field>
        </class>
                  <class name="TransactionIdResponseVO"  >
                                        
                <field name="TRANSACTION_ID" type="string"
required="true">
                   <bind-xml name="TRANSACTION_ID" />
                   </field>
                </class>
</mapping>
**----------------------------------------------------------------------
--**

But am getting the out put like this
**----------------------------------------------------------------------
--**

<TRANSACTION_ID_SERVICE_RESPONSE>
        <HEADER>
                <SERVICE_CONSUMER_ID>1234</SERVICE_CONSUMER_ID>
                <SERVICE_NAME> TRANSACTION_ID_SERVICE </SERVICE_NAME>
        </HEADER>
        <BODY>
                <RESPONSES>
                        <TRANSACTION_ID>2455</TRANSACTION_ID>
                </RESPONSES>
                <RESPONSES>
                        <TRANSACTION_ID>2455</TRANSACTION_ID>
                </RESPONSES>
                <RESPONSES>
                        <TRANSACTION_ID>2455</TRANSACTION_ID>
                </RESPONSES>
        </BODY>
</TRANSACTION_ID_SERVICE_RESPONSE>
**----------------------------------------------------------------------
--**
How do I remove the <RESPONSES> tags which are repeating so that I will
get as  below xml format.

Here is my expected output xml.
**----------------------------------------------------------------------
--**
<?xml version="1.0"?>
<TRANSACTION_ID_SERVICE_RESPONSE>
        <HEADER>
                <SERVICE_CONSUMER_ID>1234</SERVICE_CONSUMER_ID>
                <SERVICE_NAME>TRANSACTION_ID_SERVICE</SERVICE_NAME>
        </HEADER>
        <BODY>
                <RESPONSES>
                        <TRANSACTION_ID>ID1</TRANSACTION_ID>
                        <TRANSACTION_ID>ID2</TRANSACTION_ID>
                </ RESPONSES >
        </BODY>
</TRANSACTION_ID_SERVICE_RESPONSE>

**----------------------------------------------------------------------
--**

-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to