cancel
Showing results for 
Search instead for 
Did you mean: 

Setting SOAP Fault Response in iFlow Exception Handler

jasonwilliams
Explorer
0 Kudos

Hi,

I have an iFlow called from S/4 via the SOAP adapter. I have the Validator in my flow checking the structure of the message. The SOAP adapter Message Exchange Pattern is set to "One Way". When the validation/iFlow fails a SOAP fault is generated with a simple pre-canned message saying to look at the MPL. Which unfortunately gives no additional information due to a further message saying to check the MPL attachments. These of course don't exist due to our environment posting more than the 1Gb of log attachments per day (can you tell I'm frustrated?).

So I would like to be able to add some additional information to the SOAP Fault description / details element.

Are we able to do this eg. by adding a CPI/Camel header etc in the iFlow fault handler etc?

Obviously if we were using Request-Reply then I would have control over the body and can set the body with a defined message which can include the stack trace and exception message etc.

Thanks,

Jason

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hello Williams,

Actually, "SOAP one-way" pattern is implemented on the synchronous protocol HTTP. However, it does not return a SOAP application response, but an HTTP response that reports whether the message arrived or not, e.g.: with an error code (200, 204, 404 etc.). It is not intended to transmit application-dependent responses via this method.

However, we do not know exactly how SOAP is implemented on the CPI. It might be worth a try to check the "Return Exception to Sender" box in the error configuration.

Let me know, if this works for your scenario.

Cheers

Dennis Sentler

jasonwilliams
Explorer

Hi Dennis,

Thanks for the response. This was exactly what I was looking for. The plain SOAP Fault was enhanced with the faultString that provided the reason for the validation failure.

Thanks again,

Jason

Answers (0)