I am migrating a web service client from WSE to WCF.
I already modified the internal fault and error handling to deal with FaultExceptions instead of SoapExceptions.
The project has an extensive suite of test cases to test the fault and error handling which still relies on SoapException. For various reasons, I’d prefer not to rewrite them all.
Is it possible to just convert the SoapException into a FaultException and thereby running the old test cases against the new error handling code?
What about using a message inspector ? Have you checked the IClientMessageInspector ?
It may look like this :
The message inspector
The endpoint behavior
http://weblogs.asp.net/paolopia/archive/2007/08/23/writing-a-wcf-message-inspector.aspx
I think a good practice is to use exceptions as faults too.