MessageHeaderAttribute::MustUnderstand Property
Specifies whether the node acting in the Actor role must understand this header. This is mapped to the mustUnderstand SOAP header attribute.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
For more information, see the Remarks section of MessageHeaderAttribute for details.
Important |
|---|
It is important to remember that if the MustUnderstand property is true in a message being sent and the application on the receiving side does not understand the header a fault is generated. Conversely, if a header with the mustUnderstand SOAP header attribute set to true is received by Windows Communication Foundation (WCF), it must be a part of the message contract (or must be processed by one of the Windows Communication Foundation (WCF) channels); otherwise, it is assumed that the header is not understood and an exception is thrown. |
The following code example shows the use of the MessageHeaderAttribute to create a SOAP header for the response message with the Name, Namespace and MustUnderstand properties set to values appropriate for this header. The code example is followed by an example of the message when sent.
Available since 3.0
