Friday, May 13, 2011

SOA - convert any exception to a fault exception for your clients...

Mates,
 
I have been reading an interesting article that struck my mind while designing an SOA architecture in .NET 3.5/WCF services.
 
The objective was to convert all the exception (type any) as a service host, convert them to a generic fault contract type and send it to client, so that they can process it.
 
I found an easy way by using Microsoft Application Blocks and “Fault Contract Exception Handler”, we can actually trap the exception using MABs, transform / map the fields from exception to the custom fault contract we have defined and reThrow it J
 
 
Mehul Trivedi
 
 
 
 
Mehul Trivedi
Office: +1 (954) 514-4667
 
 
 

No comments:

Post a Comment