on 06-24-2020 6:00 PM
Greetings,
I used Gather and merged two different payload which is of same XML format after Gather step i added XML to CSV converter(attached) to convert to CSV.
Since i have used MultiMapping i am getting payload as below
<?xml version='1.0' encoding='UTF-8'?><multimap:Messages xmlns:multimap="http://sap.com/xi/XI/SplitAndMerge"><multimap:Message1><root><row>
Now i used a groovy script(given below) to ignore the below tags
<multimap:Messages xmlns:multimap="http://sap.com/xi/XI/SplitAndMerge"><multimap:Message1>
Groovy Script:
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
import java.io.*;
def Message processData(Message message) {
//get Body
def body = message.getBody(java.lang.String) as String;
//replaceMultimap tag
body = body.replaceAll("<multimap:Messages xmlns:multimap=\"http://sap.com/xi/XI/SplitAndMerge\">", "");
//body = body.replaceAll("\"http://sap.com/xi/XI/SplitAndMerge\">", "");
body = body.replaceAll("<multimap:Message1>","");
body = body.replaceAll("</multimap:Message1>", "");
body = body.replaceAll("</multimap:Messages>", "");
//set body
message.setBody(body);
return message;
}
After adding i am getting below response
Unmarshalling XML Failed
Can anyone help me out to resolve this issue
Thanks in advancexmltocsv-1.png
Regards
Naveen
Hi navepras,
You can skip removing the outer multimap:Messages or multipmap:Message tags completely.
Instead configure the XML to CSV Converter as
/multimap:Messages/multimap:Message1/root/row
You will have to declare the Namespace under Runtime Configuration => Namespace Mapping as
xmlns:multimap=http://sap.com/xi/XI/SplitAndMerge
Hope this helps,
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Naveen,
Please provide your input data.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is my XML Payload attached, I am calling data from SF which is 2 Parallel SF call and used gather to join those
If you want input data!! can you specify which input data you need ?callactivity-21.txt
Regards
Naveen
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.