Interview Questions

Describe the SOAP mustUnderstand attribute ?

SOAP Interview Questions and Answers


(Continued from previous question...)

Describe the SOAP mustUnderstand attribute ?

The SOAP mustUnderstand attribute can be used to indicate whether a header entry is mandatory or optional for the recipient to process.
If you add mustUnderstand="1" to a child element of the Header element it indicates that the receiver processing the Header must recognize the element. If the receiver does not recognize the element it will fail when processing the Header.
Syntax
soap:mustUnderstand="0|1"

Example
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.www.org/2010/12/soap-envelope"
soap:encodingStyle="http://www.www.org/2010/12/soap-encoding">

<soap:Header>
<m:Trans xmlns:m="http://www.www.org/2010/12/transaction/"
soap:mustUnderstand="1">234
</m:Trans>
</soap:Header>
...
...
</soap:Envelope>

(Continued on next question...)

Other Interview Questions