PROPID_M_SOAP_BODY

 

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

(Write-only, introduced in MSMQ 3.0.) The PROPID_M_SOAP_BODY property specifies the application-generated SOAP body elements for inclusion in the SOAP envelope of an SRMP message.

Property ID

PROPID_M_SOAP_BODY

Type Indicator

VT_LPWSTR

MQPROPVARIANT Field

pwszVal

Property Value

A string of Unicode characters containing XML body elements for inclusion in the SOAP envelope of the SRMP message.

Remarks

The PROPID_M_SOAP_BODY property is a write-only property that is used only when an application sends SRMP messages. When an SRMP message is sent, the sending queue manager inserts the string of SOAP body elements specified in this property into the SOAP body portion of the SOAP envelope in the message. It then attaches the SOAP envelope, and, when applicable, SOAP attachments to the message.

The SOAP body, which is part of the SOAP envelope, is distinct from the application-defined message body, which is sent as an attachment to the SRMP message.

To set application-generated SOAP body elements, specify PROPID_M_SOAP_BODY in the MQMSGPROPS structure and call MQSendMessage.

To set additional application-generated SOAP header elements in the SOAP envelope, use the PROPID_M_SOAP_HEADER property.

To retrieve the complete SOAP envelope, use the PROPID_M_SOAP_ENVELOPE property.

To retrieve the entire contents of an SRMP message in the form of an array of bytes, including both the SOAP envelope and the SOAP attachments associated with it, use the PROPID_M_COMPOUND_MESSAGE property.

To set or retrieve the message body, which is sent as an attachment in an SRMP message, use the PROPID_M_BODY property.

The PROPID_M_SOAP_BODY property is write-only. If the receiving application attempts to retrieve the PROPID_M_SOAP_BODY property, MQReceiveMessage or MQReceiveMessageByLookupId returns the warning MQ_INFORMATION_PROPERTY, the individual result for the PROPID_M_SOAP_BODY property is MQ_INFORMATION_PROPERTY_IGNORED, and the other properties are received correctly.

Equivalent COM Property

With COM components, the equivalent property is MSMQMessage.SoapBody.

Example Code

The following code fragment shows how PROPID_M_SOAP_BODY is specified in arrays that can be used to initialize an MQMSGPROPS structure for setting application-generated SOAP body elements.

aMsgPropId[i] = PROPID_M_SOAP_BODY;         // Property ID  
aMsgPropVar[i].vt = VT_LPWSTR;              // Type indicator  
aMsgPropVar[i].pwszVal = wszSoapBody;  
i++;  

See Also

Message Properties
MQMSGPROPS
MQSendMessage
MSMQMessage.SoapBody
PROPID_M_BODY
PROPID_M_COMPOUND_MESSAGE
PROPID_M_SOAP_ENVELOPE
PROPID_M_SOAP_HEADER