cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch SOAP Fault Message in Receiver in CPI

markbernabe
Active Participant

Hi experts,

My scenario is a simple SOAP call. In case of an error, the SOAP web service returns 500/Internal Server Error response. It's an XML containing the fault message. I want to catch this fault message and perform additonal processing on it like sending it over to a Message Mapping step. I want to do this instead of using ${exception.message} and ${exception.stacktrace} because the fault message contains more info about the error. However, I can't seem to fetch it. It's showing up when I enable the trace but it doesn't even go to the exception subprocess. I've tried ticking Return HTTP Response Code as Header in the adapter and also ${header.CamelHttpResponseCode} but to no avail.

Has anyone managed to accomplish this? Appreciate any tips and tricks. Thanks!

View Entire Topic
rolfhoven
Explorer
0 Kudos

How did you do this ?

2. Wrap your request message body in SOAP Envelope in a Content Modifier before calling the adapter.


Regards,

Rolf

markbernabe
Active Participant

Hi Rolf,

It looks like this: