on 09-20-2005 3:30 PM
I want to map the following input structure to output structure,
<MSG1>
<Input_Rec>
<Vendor>1</Vendor>
<Invoice>
<Amt>10</Amt>
<Num>1</Num>
</Invoice>
<Invoice>
<Amt>20</Amt>
<Num>2</Num>
</Invoice>
</Input_Rec>
</MSG1>
as the following
<MSG2>
<Output_Rec>
<Vendor>1</Vendor>
<Amt>10</Amt>
<Num>1</Num>
</Output_Rec>
<Output_Rec>
<Vendor>1</Vendor>
<Amt>20</Amt>
<Num>2</Num>
</Output_Rec>
</MSG2>
Is this feasible using message mapping? or do we have to use XSLT or JAVA mapping?
Hi,
msg1 structure into mapping editor in source side.
Msg2 structure into destination side.
Use graphical message mapping editor.
Just test it and oberver the log file.
Regards,
Mallikarjun.M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply.. In my example,Invoice can appear multiple times in input message..But that is not the case with output message. For each occurance of invoice, I need to create a new 'Output_rec' node with all the header values (vendor number in this case).. How do I achieve the desired result... If I map the invoice node to the Output rec node, it fails when it cannot create the vendor node..
Thanks Suresh.. I have a slightly differnt requirement now, where they want invoice numbers from different tags concatenated into one..
<MSG1>
<Input_Rec>
<Vendor>1</Vendor>
<Invoice>
<Num>1</Num>
</Invoice>
<Invoice>
<Num>2</Num>
</Invoice>
</Input_Rec>
</MSG1>
as the following
<MSG2>
<Output_Rec>
<Vendor>1</Vendor>
<Num>1,2</Num>
</Output_Rec>
</MSG2>
Hi,
For this you can use Advance mapping funcation.
in which you have to use java coding.
Keep 1 input parameter to the funcation.
in the code you can loop through all the Num pass as the array and append them as you want.
dont forget to set context of the Num to Input_Rec (you can do this by left clicking onto the Num that goes as input to your custom mapping funcation in the mapping editor
Open the message mapping, there are three tab (Design, Test, Messages), open Messages tab add the messages you want. From there you know what to do.
regards
SKM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.