WsSendReplyMessage function (webservices.h)
Sends a message which is a reply to a received message.
Syntax
HRESULT WsSendReplyMessage(
[in] WS_CHANNEL *channel,
[in] WS_MESSAGE *replyMessage,
[in] const WS_MESSAGE_DESCRIPTION *replyMessageDescription,
[in] WS_WRITE_OPTION writeOption,
const void *replyBodyValue,
[in] ULONG replyBodyValueSize,
[in] WS_MESSAGE *requestMessage,
[in, optional] const WS_ASYNC_CONTEXT *asyncContext,
[in, optional] WS_ERROR *error
);
Parameters
[in] channel
A pointer to the Channel object on which to send the reply Message. The pointer must reference a valid WS_CHANNEL object.
[in] replyMessage
A pointer to the Message object for sending the reply. The pointer must reference a valid WS_MESSAGE object.
Message object state must be set to WS_MESSAGE_STATE_EMPTY or WS_MESSAGE_STATE_INITIALIZED.
[in] replyMessageDescription
A pointer to a WS_MESSAGE_DESCRIPTION object. The action field of WS_MESSAGE_DESCRIPTION is used as the action header for the reply message. This field can be NULL if no action is required.
The bodyElementDescription field of the WS_MESSAGE_DESCRIPTION is used to serialize the body of the reply message. This field may be NULL if no body element is desired. See WsWriteBody for information about how the bodyElementDescription is used to serialize a value.
[in] writeOption
Determines whether the body element is required, and how the value is allocated.
See WS_WRITE_OPTION for more information.
replyBodyValue
A void pointer to the value to serialize in the reply message.
[in] replyBodyValueSize
The size in bytes of the reply value being serialized.
[in] requestMessage
A pointer to a WS_MESSAGE object encapsulating the request message text. This is used to obtain correlation information used in formulating the reply message.
[in, optional] asyncContext
A pointer to a WS_ASYNC_CONTEXT data structure with information about invoking the function asynchronously. A NULL value indicates a request for synchronous operation.
[in, optional] error
A pointer to a WS_ERROR object where additional information about the error should be stored if the function fails.
Return value
This function can return one of these values.
Return code | Description |
---|---|
|
The asynchronous operation is still pending. |
|
The operation was aborted. |
|
The operation is not allowed due to the current state of the object. |
|
The connection with the remote endpoint was terminated. |
|
The input data was not in the expected format or did not have the expected value. |
|
The operation did not complete within the time allotted. |
|
A quota was exceeded. |
|
Security verification was not successful for the received data. |
|
A security operation failed in the Windows Web Services framework. |
|
A security token was rejected by the server because it has expired. |
|
Ran out of memory. |
|
One or more arguments are invalid. |
|
This function may return other errors not listed above. |
Remarks
The reply message will including correlation information as appropriate to the WS_ADDRESSING_VERSION. See Channel Layer Overview for more information about correlating request reply messages.
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 |