The SOAP message (used by an XML Web Service and WCF service) is a standard XML document consisting of a root
Envelope tag, which in turn consists of a required
Body element and an optional
Header element. Each sub element under the optional
Header is called a SoapHeader, which plays a similar role as the other headers, uses a certain network protocol's transmit package.
A SoapHeader is often used in SOAP messages to carry some application protocol-level data in addition to the SOAP body. WCF has used many built-in SoapHeaders for certain protocols it supports (WS-Security, WS-Reliability, and so on). For some user scenarios, we will also need to add a custom SoapHeader into the WCF service message so as ...