Fault Contracts is the way to handle exceptions in WCF. The problem with exceptions is that those are technology specific and therefore cannot be passed to other end because of interoperability issue. (Means either from Client to Server or vice-versa). There must be another way representing the exception to support the interoperability. And here the SOAP Faults comes into the picture.
Soap faults are not specific to any particular technology and they are based on industry standards.
To support SOAP Faults WCF provides FaultException class. This class has two forms:
a. FaultException : to send untyped fault back to consumer
b. FaultException<T>: to send typed fault data to the client
WCF service also provides FaultContract attribute so that developer can specify which fault can be sent by the operation (method). This attribute can be applied to operations only.
Soap faults are not specific to any particular technology and they are based on industry standards.
To support SOAP Faults WCF provides FaultException class. This class has two forms:
a. FaultException : to send untyped fault back to consumer
b. FaultException<T>: to send typed fault data to the client
WCF service also provides FaultContract attribute so that developer can specify which fault can be sent by the operation (method). This attribute can be applied to operations only.
0 comments:
கருத்துரையிடுக