WsRemoveMappedHeader function (webservices.h)

Removes all instances of a mapped header from the message.

Syntax

HRESULT WsRemoveMappedHeader(
  [in]           WS_MESSAGE          *message,
  [in]           const WS_XML_STRING *headerName,
  [in, optional] WS_ERROR            *error
);

Parameters

[in] message

The message to set the header in.

The message can be in any state but WS_MESSAGE_STATE_EMPTY.

[in] headerName

The name of the mapped header to remove.

[in, optional] error

Specifies where additional error information should be stored if the function fails.

Return value

This function can return one of these values.

Return code Description
E_INVALIDARG
One or more of the parameters are incorrect.
Other Errors
This function may return other errors not listed above.

Remarks

A message may contain additional transport-specific information that is not part of the message envelope. This transport-specific information can be exposed programmatically as headers of the Message object. This function is used to remove mapped headers from the message object. This can be used by a custom channel implementation to remove mapped headers prior to sending the message.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header webservices.h
Library WebServices.lib
DLL WebServices.dll