3.2.5.3.8 Rules for the wxf:ReceiveResponse Message

When a client is ready to receive output it sends a wxf:Receive request, as specified in section 3.1.5.3.7. A server implementation MUST process this wxf:Receive message and send a response message using a wxf:ReceiveResponse message, as specified in [MS-WSMV], section 3.1.4.14. A server implementation MUST send the wxf:ReceiveResponse message only after it receives a wxf:Receive message from the client for the corresponding RunspacePool or pipeline.

A server implementation MUST use the stream name "stdout" to send data to the client. A client expects data from the server in this stream only.

The following information MUST be included in the Stream element of the message.

Element

Value

Name

Stdout

CommandId

This attribute MUST be identical to that sent in the wxf:CommandResponse for the executed pipeline message, as specified in section 3.2.5.3.4.

This attribute MUST NOT be specified if the wxf:ReceiveResponse message is targeted to the RunspacePool.

The body of the Stream element MUST contain the actual data. The data MUST be in the form as described in Messages (section 2).The following information SHOULD be included in the CommandState element of the message if the message is meant for a pipeline.

Element

Value

CommandId

This attribute MUST NOT be specified if the wxf:ReceiveResponse message is targeted to the RunspacePool. If present, this attribute MUST be identical to that sent in the wxf:CommandResponse for the executed pipeline message, as specified in section 3.2.5.3.4.

This element is not required to be present in every wxf:ReceiveResponse message. If present, the value in the State attribute identifies the Command State.

State

The value of the attribute identifies the state of the wxf:Command.

This element is not required to be present in every wxf:ReceiveResponse packet. A value of http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done specifies that this wxf:ReceiveResponse packet is the final wxf:ReceiveResponse message from the server for that particular pipeline (as identified by CommandId) or for that particular RunspacePool (as identified by ShellId selector).

As described previously, the wxf:ReceiveResponse messages MUST NOT be sent for a particular RunspacePool or pipeline when a CommandState/Done state message is sent.

The server uses wxf:ReceiveResponse messages to send PSRP messages to clients, if any, according to the rules described in section 3.2.5.4.