Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

WsSendReplyMessage function

Sends a message which is a reply to a received message.

Syntax


HRESULT WINAPI  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 requestBodyValueSize,
  _In_      WS_MESSAGE* requestMessage,
  _In_opt_  const WS_ASYNC_CONTEXT* asyncContext,
  _In_opt_  WS_ERROR* error
);

Parameters

channel [in]

A pointer to the Channel object on which to send the reply Message. The pointer must reference a valid WS_CHANNEL object.

replyMessage [in]

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.

Note  If an initialized message is provided it must be initialized using WS_REPLY_MESSAGE or WS_FAULT_MESSAGE.

replyMessageDescription [in]

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.

writeOption [in]

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.

requestBodyValueSize [in]

The size in bytes of the reply value being serialized.

requestMessage [in]

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.

Note  The message can be in any state except WS_MESSAGE_STATE_EMPTY.

asyncContext [in, optional]

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.

error [in, optional]

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 codeDescription
WS_S_ASYNC

The asynchronous operation is still pending.

WS_E_OPERATION_ABORTED

The operation was aborted.

WS_E_INVALID_OPERATION

The operation is not allowed due to the current state of the object.

WS_E_ENDPOINT_DISCONNECTED

The connection with the remote endpoint was terminated.

WS_E_INVALID_FORMAT

The input data was not in the expected format or did not have the expected value.

WS_E_OPERATION_TIMED_OUT

The operation did not complete within the time allotted.

WS_E_QUOTA_EXCEEDED

A quota was exceeded.

WS_E_SECURITY_VERIFICATION_FAILURE

Security verification was not successful for the received data.

WS_E_SECURITY_SYSTEM_FAILURE

A security operation failed in the Windows Web Services framework.

WS_E_SECURITY_TOKEN_EXPIRED

A security token was rejected by the server because it has expired.

E_OUTOFMEMORY

Ran out of memory.

E_INVALIDARG

One or more arguments are invalid.

Other Errors

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

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.