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.
My questions:
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 ?
I inspected the BP: http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16665448 and the WSDL spec: http://www.w3.org/TR/wsdl#_soap:header
But they do not supply this kind of information unfortunately....
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.
My questions:
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 ?
I inspected the BP: http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16665448 and the WSDL spec: http://www.w3.org/TR/wsdl#_soap:header
But they do not supply this kind of information unfortunately....