cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I would like to know what is the best way to implement multimapping in CPI.

My requirement is to map 1 message to 2 messages.

In the editor it looks like this

Senderside

<Messages>

<Message1>

........

</Message1>

<Messages>

and in the Receiverside

<Messages>

<Message1>

........

</Message1>

<Message2>

.........

<Message2>

<Messages>.

I created the mapping and tested it, For testing purposes i added the <messages><message1> tags to my message and the mapping worked.

For runtime i sent the message (without <messages><message1> tags ) and it failed.

I then looked for a solution and one suggestion was to add a Content Modifier to the iFlow for the message body:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<ns3:Messages xmlns:ns3="http://sap.com/xi/XI/SplitAndMerge">

<ns3:Message1>

${in.body}

</ns3:Message1>

</ns3:Messages>

I added the content modifier and now my mapping works.

But now i have a problem that the result message looks like this:

<Messages>

<Message1>

........

</Message1>

<Message2>

.........

<Message2>

<Messages>.

How do get rid of all these tags?

And is this really the best solution to my mapping requirement? It seems to me a very clumsy way of doing a multimap. (compared to the way it was done in PO)

Regards

Robert

0 Likes
View Entire Topic
Keylla_Lima
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Robert,

Please try with single quote for the snippet you want to replace that has url with double quotes:

body.replaceAll('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">',""> ;
Robert_d_Hoedt
Explorer
0 Likes

Hi Keylla,

Thx for your answer.

Incidentally i found the same somewhere else, but didnt see your answer yet.

Whichever way, thank you for helping me out.

Regards

Robert