When there is a fault related to the body or there is a processing error on the server side, the server is expected to supply a SOAPFault in the body, and no other body elements should be present. The fault code will then indicate if it is a client or server fault.
All processing problems related to the header should not be refected as a SOAPFault in the body, but via the header.
To support this, you can define in WSDL , besides the soap:header, also the soap:headerFault element. In case there is a processing error with the header, the reply will contain the message as indicated by the soap:headerFault.
1) When the mustUnderstand attribute is set and the server cannot understand the header a SOAPFault is supplied in the body. Why is this ? It seems logical to me that this should be a headerFault...
2) How is the client suposed to know that there was a problem processing a header ? Off course, this information is present in the WSDL, but there is no indication in the message itself that there was an error processing the header. You cannot distinguish a fault header from a normal header when looknig just at the SOAP message, or am I missing something ?
3) What are the exact rules for the headerFault ? for example; when an headerFault takes place, may the body still contain other data ?
When there is a problem processing a header, tere is a SOAPFault present in the body but it may contain NO detail element when the problem is header related. Also, when the header in question has an actor attr specified, the actor element in the SOAPFault will contain this value. So you can determine if there is a fault related to the header by examing the SOAP message.
However, does this mean that in case a soap:headerFault is specified the message specified by that headerFault is present in the reply header ?
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop