Hello everyone.
I am using a service endpoint process step to invoke a third party SOAP web service.
In case a functional error occurs (ex. it is not possible to execute the given operation when an order is in state committed) the service replies with a SoapFault exception.
This causes the error to be logged in the Event Log, even though there's no action required from the user and I would like to ignore the error.
Is there anything I could do differently or configure in order to prevent the error from being logged ?
Thank you
Fabrizio
Tags:
Which build are you on? Any build newer than 3.5.4.883 has a feature on the Service Endpoint step called "Throw Exception on Fault". If you check this box, and put the service endpoint step inside the Try block of the Exception step, you should be able to catch it without the exception appearing in the event log.
Hi Joe,
I'm running .885 in production and .1017, on DEV, so I should experience the same on both environment.
I just tried again on DEV, "cleaning" the catch block and leaving just a cancel.
As a result I got one message audited as failed and 4 event in the event log (3 ClientConnector and 1 Message Audit Service) as attached.
The scenario is that the third party service is designed to return a SoapFault even when a "functional" error occurs. It includes an error code and I would like to filter on that code, some of the errors can be ignored and I don't want them to be logged in the event log.
Do you see any other possible solution?
Fabrizio
You have to make sure you do a few things here:
1. The Service Endpoint step is in the Try block of an Exception step
2. Make sure the "Throw Exception on Fault" property of the Service Endpoint Step is set to true
3. You have a Cancel step in the Finally block
4. For the faults that you do not want to appear in the event viewer, you need have this line of code in a C# step inside the Cancel block:
context.Data.Header.FaultType = FaultType.None
if you don't do this, then the client connector will see that the reply is a fault and that is the cause of the failed message and the four errors in the event log. When the above line of code is added, the SOAP Fault is just passed back to the caller (or whatever you want to send back).
Make sense?
Joe
Thanks Joe, now it's more clear.
I have implemented your solution and it works correctly.
Thanks
Neuron ESB Product Support Forums and Communities
© 2024 Created by Neuron Admin. Powered by