Hi!
Dan Drillich wrote:
Looking at Schema for the SOAP/1.1 envelope (couldn't find the 1.2 version) that defines mustUnderstand as a global attribute.
Good research!
However, the SOAP 1.2 specification (
http://www.w3.org/TR/2007/REC-soap12-part1-20070427/) says:
A SOAP sender generating a SOAP message SHOULD use the mustUnderstand attribute information item only on SOAP header blocks. A SOAP receiver MUST ignore this attribute information item if it appears on descendants of a SOAP header block or on a SOAP body child element information item (or its descendents).
In the SOAP 1.1 specification (
http://www.w3.org/TR/2000/NOTE-SOAP-20000508), section 4.2 is on SOAP Headers. In section 4.2.1 it talks about header attributes:
The SOAP Header attributes defined in this section determine how a recipient of a SOAP message should process the message as described in section 2. A SOAP application generating a SOAP message SHOULD only use the SOAP Header attributes on immediate child elements of the SOAP Header element. The recipient of a SOAP message MUST ignore all SOAP Header attributes that are not applied to an immediate child element of the SOAP Header element.
Further down, in section 4.2.3 the mustUnderstand attribute is discussed. This leads me to believe that the mustUnderstand attribute is a SOAP Header attribute and, while being allowed to appear anywhere by the XML schema, is to be ignored if appearing outside the SOAP Header element.
Thus I have proved myself wrong
- the XML schema will not tell you where the mustUnderstand attribute may or may not appear. Instead this information is to be found in the SOAP 1.1 and 1.2 specifications.
Best wishes!