WsRequestReply function
Used to send a request message and receive a correlated reply message.
Syntax
HRESULT WINAPI WsRequestReply( _In_ WS_CHANNEL* channel, _In_ WS_MESSAGE* requestMessage, _In_ const WS_MESSAGE_DESCRIPTION* requestMessageDescription, _In_ WS_WRITE_OPTION writeOption, const void* requestBodyValue, _In_ ULONG requestBodyValueSize, _In_ WS_MESSAGE* replyMessage, _In_ const WS_MESSAGE_DESCRIPTION* replyMessageDescription, _In_ WS_READ_OPTION readOption, _In_opt_ WS_HEAP* heap, void* value, _In_ ULONG valueSize, _In_opt_ const WS_ASYNC_CONTEXT* asyncContext, _In_opt_ WS_ERROR* error );
Parameters
- channel [in]
-
The channel to do the request-reply operation on.
- requestMessage [in]
-
The message object to use to send the request.
The message object should be in WS_MESSAGE_STATE_EMPTY or WS_MESSAGE_STATE_INITIALIZED.
- requestMessageDescription [in]
-
The action field of the WS_MESSAGE_DESCRIPTION is used as the action header for the request message. This field may be NULL if no action is required.
The bodyElementDescription field of the WS_MESSAGE_DESCRIPTION is used to serialize the body of the request message. This field may be NULL if no body element is desired. See WsWriteBody for information about how the body is serialized according to the bodyElementDescription.
- writeOption [in]
-
Whether the body element is required, and how the value is allocated. See WS_WRITE_OPTION for more information.
- requestBodyValue
-
A pointer to the value to serialize in the body of the request object.
- requestBodyValueSize [in]
-
The size of the request value being serialized, in bytes.
- replyMessage [in]
-
The message object to use to receive the reply.
The message object should be in WS_MESSAGE_STATE_EMPTY.
- replyMessageDescription [in]
-
The action field of the WS_MESSAGE_DESCRIPTION is used to verify the action header of the received reply message. This field may be NULL if no action is required. If NULL, the action header of the received message is ignored if present.
The bodyElementDescription field of the WS_MESSAGE_DESCRIPTION is used to deserialize the body of the reply message. This field may be NULL if no body element is desired. See WsReadBody for information about how the body is deserialized according to the bodyElementDescription.
- readOption [in]
-
Whether the reply body element is required, and how to allocate the value. For more information, see WS_READ_OPTION and WsReadBody.
- heap [in, optional]
-
The heap used to allocate deserialized reply body values. If the heap is not necessary for the given type, then this parameter can be NULL.
- value
-
Where to store the deserialized values of the body.
The interpretation of this parameter depends on the WS_READ_OPTION.
If the bodyElementDescription of the reply WS_MESSAGE_DESCRIPTION is NULL, then this parameter is not touched. In this case, the parameter does not need to be specified.
- valueSize [in]
-
The interpretation of this parameter depends on the WS_READ_OPTION.
- asyncContext [in, optional]
-
Information on how to invoke the function asynchronously, or NULL if invoking synchronously.
- error [in, optional]
-
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 |
|---|---|
|
The reply message contained a fault. The fault can be extracted from the WS_ERROR using WsGetErrorProperty. |
|
The asynchronous operation is still pending. |
|
The operation was aborted. |
|
The operation is not allowed due to the current state of the object. |
|
The remote endpoint does not exist or could not be located. |
|
Access was denied by the remote endpoint. |
|
The connection with the remote endpoint was terminated. |
|
The remote endpoint could not process the request. |
|
The remote endpoint is not currently in service at this location. |
|
The remote endpoint is unable to process the request due to being overloaded. |
|
The remote endpoint was not reachable. |
|
The endpoint address URL is invalid. |
|
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. |
|
Access was denied by the HTTP proxy server. |
|
The HTTP proxy server could not process the request. |
|
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. |
|
The HTTP proxy server requires HTTP authentication scheme 'basic'. |
|
The HTTP proxy server requires HTTP authentication scheme 'digest'. |
|
The HTTP proxy server requires HTTP authentication scheme 'negotiate'. |
|
The HTTP proxy server requires HTTP authentication scheme 'NTLM'. |
|
The remote endpoint requires HTTP authentication scheme 'basic'. |
|
The remote endpoint requires HTTP authentication scheme 'digest'. |
|
The remote endpoint requires HTTP authentication scheme 'negotiate'. |
|
The remote endpoint requires HTTP authentication scheme 'NTLM'. |
|
A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file. |
|
The certificates CN name does not match the passed value. |
|
A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider. |
|
The certificate is not valid for the requested usage. |
|
The revocation function was unable to check revocation because the revocation server was offline. |
|
Ran out of memory. |
|
One or more arguments are invalid. |
|
This function may return other errors not listed above. |
Remarks
The messages are correlated 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 |
|
|
Library |
|
|
DLL |
|