The Exception Handling web service
This service was already introduced in the Chapter 3, ESB Exception Handling, dedicated to the exception management in the ESB Toolkit.
In order to submit a fault into the ESB so it's handled by the standard ESB faults processing logic we might have in place in our ESB, we just need to instantiate the FaultMessage
class defined in the service contract, fill its properties, and use it as an input for the
SubmitFault
operation of the service.
The properties on that fault message are the same as the ones we already described in the Chapter 3, ESB Exception Handling:
Ex.ExceptionHandling handleException = new ExceptionHandlingService.SubmitFault.ExceptionHandling(); handleException.Credentials = System.Net.CredentialCache.DefaultCredentials; Ex.FaultMessage faultMsg = new Ex.FaultMessage(); faultMsg.Header = new Ex.FaultMessageHeader(); faultMsg.Header.Application = "Exception Handling...