on 09-11-2019 9:44 PM
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.
Regards
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fernando
Which step fails? It sounds to me like it's a step expecting an XML document, but the property does not, in fact, contain an XML document.
Could you show the exact contents of the property, after you've extracted the CDATA section? If special characters are escaped, it's no longer an XML document.
Regards,
Morten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.