Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have requirement where i need to create acknowledgement xml file and below is the logic:
Ack message should be nested in a way that , if the message has multiple Addresses and each Address has multiple Contacts/Banks, then i need to send a single acknowledgement message with status for each Address Section and the corresponding Contacts/Banks that are linked to that Address. Data example is below.
-->I have tried to use txmlmap component but it seems grouping is not working correctly. I have attached xml file which i am getting as a result but it is not in correct format as described in logic.
---> for duplicate address id <common:address id="S00195003"> it should grouped in one tag, can someone help me to achieve this.
<?xml version="1.0" encoding="UTF-8"?>
<commonubscriptionProcessAcknowledge xmlns:common="http://common.subscription.partyconnect.ge.com">
<common:messageId>0386639a-22db-4e15-b032-a213690be59a</common:messageId>
<common:transactionId>517560</common:transactionId>
<common:externalTransactionId/>
<common:downstreamOrgId>9792</common:downstreamOrgId>
<common:delivered>True</common:delivered>
<common:status>FAILURE</common:status>
<common:message>Data not saved in ERP</common:message>
<commonarty id="S00195">
<common:status>SUCCESS</common:status>
<common:message/>
<common:downstreamEntityId>10142</common:downstreamEntityId>
<common:address id="S00195003">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
<common:bankAccount id="BA-0000-0000-0000-0001">
<common:status>SUCCESS</common:status>
<common:message/>
<common:downstreamEntityId>11111/bank01</common:downstreamEntityId>
</common:bankAccount>
<common:contact id="CO-0000-0000-0000-0622">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
</common:contact>
</common:address>
<common:address id="S00195003">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
<common:bankAccount id="BA-0000-0000-0000-0002">
<common:status>SUCCESS</common:status>
<common:message/>
<common:downstreamEntityId>11111/bank02</common:downstreamEntityId>
</common:bankAccount>
<common:contact id="CO-0000-0000-0000-0624">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
</common:contact>
</common:address>
<common:address id="S00195004">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
<common:bankAccount id="BA-0000-0000-0000-0003">
<common:status>SUCCESS</common:status>
<common:message/>
<common:downstreamEntityId>11111/bank03</common:downstreamEntityId>
</common:bankAccount>
<common:contact id="CO-0000-0000-0000-0625">
<common:status>FAILURE</common:status>
<common:message/>
<common:downstreamEntityId/>
</common:contact>
</common:address>
</commonarty>
</commonubscriptionProcessAcknowledge>
Hi Eric
I am able to remove duplicates thanks for help.
After removing duplicates its observe that there is one empty node also exists.
I could not find how to remove Empty node from output.
Regards
Rajender Prasad