专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »外文资料 » faults:Using the Fault Contracts (SOAP Faults) in WCF Programming »正文

faults:Using the Fault Contracts (SOAP Faults) in WCF Programming

来源: 发布时间:星期日, 2008年10月5日 浏览:2次 评论:0

In this article we are going to see, how to use the Fault contracts in WCF programming.

What is a WCF ?

WCF (Windows Communication Foundation) is a .NET dedicated communication frame work. WCF provides an easy way to expose our methods as services and consuming the existing services as traditional methods. (More about the WCF can be found in my previous article: WCF Programming for Beginners.)

What are SOAP Faults ?

In all managed applications we use the Exception objects to handle the errors. Similarly in WCF programming also to handle the errors and convey that error information from service to client and client to service we use the SOAP faults. FaultContractAttribute, which is defined in the namespace : System.ServiceModel.FaultContractAttribute , is used to declare customized SOAP faults.

SOAP Faults mainly of two types:

  1. Declared SOAP faults. - These are the SOAP faults that are specified _disibledevent="Verdana, Arial, Helvetica, sans-serif">Now it displays the original error message details occurred at WCF Service program. Sample project code is attached.

相关文章

读者评论

  • 共0条 分0页

发表评论

  • 昵称:
  • 内容: