Partilhar via


Message Properties in HTTP Messages

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

Internet messaging is increasingly using the medium of XML, particularly the XML messaging framework of SOAP 1.1. The Web Services Routing Protocol (WS-Routing) supports both one-way and request/response message exchange paradigms. However, it is explicitly not a goal of WS-Routing to provide reliability. The SOAP Reliable Messaging Protocol (SRMP), which is implemented in MSMQ 3.0, is a published specification defining an open general-purpose extension of WS-Routing that adds reliability to WS-Routing and SOAP.

Message Queuing uses both WS-Routing and SRMP elements as well as elements defined in the MSMQ namespace to specify its message properties in HTTP messages. Some Message Queuing message properties have equivalents defined by WS-Routing, and others have equivalents defined by SRMP.

When sending an HTTP message, Message Queuing automatically transforms the individual binary message properties to specific WS-Routing elements, SRMP elements, and elements of the MSMQ namespace, and includes them in the header portion of the SOAP envelope. On the receiver side, Message Queuing maps these XML elements to the respective binary message properties before storing the message. The end-to-end semantics for transmitting message properties over a non-HTTP transport are preserved for messages sent over an HTTP transport. However, when an HTTP message is placed in its destination queue, it retains the XML elements specifying the message properties in the read-only PROPID_M_SOAP_ENVELOPE or MSMQMessage.SoapEnvelope property.

The header portion of the SOAP envelope in an HTTP message contains two required entries and up to seven optional entries in the following order:

  • <path>

    (Required.) Contains WS-Routing subelements.

  • <properties>

    (Required.) Contains SRMP subelements.

  • <services>

    (Optional.) Contains SRMP subelements.

  • <Stream>

    (Optional.) Contains SRMP subelements. This entry is generated only in transactional messages.

  • <streamReceipt>

    (Optional.) Contains SRMP subelements. A <streamReceipt> entry is generated only in order acknowledgment messages (stream receipts) sent for transactional messages (streamed HTTP messages).

  • <deliveryReceipt>

    (Optional.) Contains SRMP subelements. A <deliveryReceipt> entry is generated only in acknowledgment messages.

  • <commitmentReceipt>

    (Optional.) Contains SRMP subelements. A <commitmentReceipt> entry is generated only in acknowledgment messages.

  • <Msmq>

    (Optional.) Contains subelements defined in the MSMQ namespace.

  • <Signature>

    (Optional.) Contains subelements that specify an XML digital signature.

    These elements are followed by the optional additional application-defined XML subelements specified in the PROPID_M_SOAP_HEADER or MSMQMessage.SoapBody property of the message.

Applications can be written to create messages that are indistinguishable from Message Queuing-generated HTTP messages on computers that do not have HTTP Support installed, such as computers running MSMQ 1.0 or MSMQ 2.0. These messages can be sent as SRMP packets and accepted by queues hosted on computers with HTTP Support installed. They can then be received as HTTP messages by applications running on those computers.

More Information

For information on See
Sending HTTP messages HTTP Messages
The message properties that are mapped to WS-Routing elements Properties Mapped to WS-Routing Elements
The message properties that are mapped to SRMP elements Properties Mapped to SRMP Elements
The message properties that are mapped to elements of the MSMQ namespace Properties Mapped to Elements of the MSMQ Namespace
XML digital signatures and the composition of the <Signature> element in a message signed with an XML digital signature XML Digital Signatures