Showing results for 
Search instead for 
Did you mean: 

Content Modifier not changing body in SAP CPI

0 Kudos

Hello Gurus,

While working with CPI Content Modifier to switch the body of a message I am having an issue. I have a CDATA coming in a XML and I need to make the CDATA my new "body" for the iFlow. I assign the CDATA to a property (which I know it Works because I see the property correctly populated in the trace), but the body is not being changed, thus, my iFlows dumps at the moment I reach an XML I see the following error:

org.apache.camel.ExpectedBodyTypeException: Could not extract IN message body as type: interface javax.xml.transform.Source body is: <body itself>.

Can you provide any input? I am really desperate.


View Entire Topic
0 Kudos

Hi Morten, I was trying to switch the body for a property, so in the "Message Body" tab I was writing ${property.Name}.

This was making the XSLT to fail. What I did make it work is to add "<tag>${property.Name</tag>" in the "Message body" tab, and then adjust the XSLT to fit the new structure of the XML.

Luckily, this new 'body' did not begin with and "<?XML...." because, if it does, it would make the XSLT fail again due to a bad forming of the structure.

Thank you so much for the aid.

Active Contributor
0 Kudos

Hi Fernando

You are right to be careful when treating XML as text; it can go wrong.

If you found my answer helpful, please consider accepting or upvoting it.