The mustUnderstand Attribute
  • The mustUnderstand attribute indicates whether the recipient must process the header block.
  • The recipient is indicated by the actor element.
  • The syntax for mustUnderstand is soap:mustUnderstand="0|1"

where 1 or true indicates that it is mandatory for the receiver to recognize and process the element. Elements not annotated with the mustUnderstand attribute, or those that contain a value of 0 or false, are optional and need not be processed.

In the code example, the soap:mustUnderstand attribute is set to 1. Therefore, the recipient of this message must process the soap:Header element.

<?xml version="1.0"?>

<Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope" encodingStyle="http://www.w3.org/2001/12/soap-encoding">

  <Header>
  <m:Trans
  xmlns:m="http://www.school.com/transaction/"   actor="http://www.school.com/stock/" 
 
soap:mustUnderstand="1">
  </m:Trans>
  </Header>

  <Body>
    ...
    ...
    <Fault>
      ...
      ...
    </Fault>
  </Body>

</Envelope>

Click the Next button to continue.