Skip to Content
1
Apr 17, 2020 at 10:26 AM

Fetch SOAP Fault Message in Receiver in CPI

2891 Views

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!