How to handle incorrect SOAP fault in WCF?

后端 未结 2 1156
粉色の甜心
粉色の甜心 2021-02-06 14:00

I have to consume to a third-party web service using SOAP. It was easy to get it to work with WCF, but now I have a problem with SOAP faults. The service sends me an incorrect S

相关标签:
2条回答
  • 2021-02-06 14:16

    Yes, but it's not exactly elegant. See the message inspector code at the bottom of this forum post:

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/435850aa-bf74-4158-a29a-256135207948

    Basically, you can take the incoming message and alter it so that it can be handled by WCF.

    0 讨论(0)
  • 2021-02-06 14:22

    I believe the old-school System.Web.Services.SoapHttpClientProtocol class is more tolerant of not-up-to-snuff-or-standard Faults than the WCF System.ServiceModel.Channels.ServiceChannel.HandleReply / System.ServiceModel.Channels.MessageFualt.CreateFault.

    FWIW.

    0 讨论(0)
提交回复
热议问题