views:

12

answers:

0

I'm trying to adapt a framework originally written for WSE to WCF. The framework sometimes throws SoapExceptions from deep in its bowels, which I would like to catch and transform into FaultException objects that the WCF framework will handle.

In order for the existing clients of this framework to continue working, I need the <detail> field of the SOAP fault message to be exactly what's in the SoapException.Detail field, but I can't find a way to accomplish this. All of the docs on MSDN are geared toward using a serialized detail object, which won't work for me. Is there any way to coerce the SoapException into a FaultException or FaultException<T> object that keeps the actor, code, and detail fields from the original soap exception?