WCF IErrorHandler to return FaultException to SOAP and WebHttpException to POX and Json endpoints

后端 未结 2 755
你的背包
你的背包 2021-02-04 04:46

I have a set of SOAP webservices that are wrapping exceptions using IErrorHandler, specifically:

public sealed class ErrorHandler : IErrorHandler
{
    public bo         


        
2条回答
  •  不思量自难忘°
    2021-02-04 05:26

    I was under the impression that using webHttpBinding was a way to get the "all-in-one" functionality of JSON/POX/SOAP as opposed to using separate bindings for each (i.e. wsHttpBinding, basicHttpBinding etc.). So wouldn't you be able to just throw the WebHttpException and then have that give you all the error details you needed regardless of the technology?

提交回复
热议问题