2.2 Message Syntax
This section specifies the messages that are used by the .NET Context Exchange Protocol and their relationship to HTTP 1.1 [RFC2616] and SOAP.
When used with SOAP, the .NET Context Exchange Protocol uses a CONTEXT_XML element as a SOAP header using the SOAP extensibility model, specified in [SOAP1.2-1/2007] section 3, to form a Server Context Establishing Message or a Context Participating Message. The following figure shows the containment of CONTEXT_XML in a SOAP envelope.

Figure 3: Context Participating Message or Server Context Establishing Message using SOAP
The .NET Context Exchange Protocol uses CALLBACK_CONTEXT_XML as a SOAP header using the SOAP extensibility model, specified in [SOAP1.2-1/2007] section 3, to form a Callback Context Establishing Message. The following figure shows the containment of CALLBACK_CONTEXT_XML in a SOAP envelope.

Figure 4: Callback Context Establishing Message using SOAP
When used with HTTP 1.1, the .NET Context Exchange Protocol uses:
An HTTP Client Message Header as an HTTP header in an HTTP request message to form a Context Participating Message; or
An HTTP Server Message Header as an HTTP header in an HTTP response message to form a Server Context Establishing Message.
The next figure shows the containment of message structures, which are defined in section 2, within an HTTP request message.

Figure 5: Client Context Participating Message using HTTP 1.1
The following figure shows the containment of message structures, which are defined in section 2, within an HTTP response message.

Figure 6: Server Context Establishing Message using HTTP 1.1