PROPID_M_SOAP_ENVELOPE_LEN

 

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

(Read-only, introduced in MSMQ 3.0.) The PROPID_M_SOAP_ENVELOPE_LEN property provides the size of the SOAP envelope of an SRMP message.

Property ID

PROPID_M_SOAP_ENVELOPE_LEN

Type Indicator

VT_UI4

MQPROPVARIANT Field

ulVal

Property Value

The size (in bytes) of the SOAP envelope provided by PROPID_M_SOAP_ENVELOPE.

Remarks

The PROPID_M_SOAP_ENVELOPE_LEN property is a read-only property that is only used when an application retrieves the SOAP envelope of an SRMP message.

To retrieve the SOAP envelope, see PROPID_M_SOAP_ENVELOPE.

Note

When retrieving PROPID_M_SOAP_ENVELOPE_LEN, the type indicator can be set to VT_UI4 or VT_NULL. If you set the type indicator to VT_NULL, Message Queuing automatically changes the type indicator to VT_UI4 during the function call.

If the function call to retrieve the SOAP envelope fails, returning an MQ_ERROR_BUFFER_OVERFLOW error, use the returned value of PROPID_M_SOAP_ENVELOPE_LEN to reallocate the SOAP envelope buffer and call the applicable function again.

Equivalent COM Property

There is no COM equivalent for this property.

Example Code

The following code fragment shows how PROPID_M_SOAP_ENVELOPE_LEN is specified in arrays that can be used to initialize an MQMSGPROPS structure when retrieving the SOAP envelope and its size.

ULONG ulSOAPEnvelopeBufferLength = 1024;  
WCHAR * wszSOAPEnvelopeBuffer = NULL;  
wszSOAPEnvelopeBuffer = (WCHAR*)malloc(ulSOAPEnvelopeBufferLength*sizeof(WCHAR));  
if (wszSOAPEnvelopeBuffer == NULL)  
{  
  return MQ_ERROR_INSUFFICIENT_RESOURCES;  
}  
memset(wszSOAPEnvelopeBuffer, 0, ulSOAPEnvelopeBufferLength*sizeof(WCHAR));  
aMsgPropID[i] = PROPID_M_SOAP_ENVELOPE_LEN;      // Property ID  
aMsgPropVar[i].vt = VT_UI4;                      // Type indicator  
aMsgPropVar[i].ulVal = ulSOAPEnvelopeBufferLength;  
i++  
  
aMsgPropID[i] = PROPID_M_SOAP_ENVELOPE;          // Property ID  
aMsgPropVar[i].vt = VT_LPWSTR;                   // Type indicator  
aMsgPropVar[i].pwszVal = wszSOAPEnvelopeBuffer;  // Application-defined buffer  
i++;  

See Also

Message Properties
MQMSGPROPS
PROPID_M_SOAP_ENVELOPE