3.1.5.3.5 Rules for the wxf:Send Message

The wxf:Send message (as specified in [MS-WSMV] section 3.1.4.13) is used to send input to a pipeline or a RunspacePool. The following information is included in the message.

Element

Value

ResourceURI

The Resource URI of the RunspacePool to which this send message is targeted. For more details, see section 3.1.5.3.3.

ShellID selector

The ShellID returned in the wxf:ResourceCreated message (see section 3.1.5.3.2).

The body of the send message MUST contain a send data type as described in [MS-WSMV] section 2.2.4.32. The data type MUST contain the following information.

Element

Value

Stream

Stdin - if messages are to be sent in the regular priority order.

Pr - to send a PIPELINE_HOST_RESPONSE message (see sections 2.2.2.28 and RUNSPACEPOOL_HOST_RESPONSE message 2.2.2.16).

The Name attribute of the stream element MUST be accordingly stdin or pr.

A wxf:Send message can be sent to a RunspacePool or pipeline. If the wxf:Send message is targeted to a pipeline it MUST contain the following attribute:

Element

Attribute

Value

Stream

CommandId

The CommandId returned in the wxf:CommandResponse message (see section 3.1.5.3.4).

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

If the wxf:Send message is successfully received and processed by the server, the server MUST send either a success or a failure message. In either case a response is sent from the server. A wxf:SendResponse message, described in [MS-WSMV] section 2.2.4.33, is sent to notify success. A wxf:Fault message, described in [MS-WSMV] section 2.2.4.43, is sent to notify failure.

For any given RunspacePool or pipeline, there can be only one outstanding wxf:Send message targeted to that RunspacePool or pipeline. The client MUST wait until the server replies to the wxf:Send message with a wxf:SendResponse message or a wxf:Fault message before sending another wxf:Send message targeted to the same RunspacePool or pipeline.

Only the following PSRP messages are allowed to be sent to the server using the wxf:Send message: SESSION_CAPABILITY (section 2.2.2.1), INIT_RUNSPACEPOOL (section 2.2.2.2), PUBLIC_KEY (section 3.1.5.4.3), SET_MAX_RUNSPACES (section 3.1.5.4.6), SET_MIN_RUNSPACES (section 3.1.5.4.7), CREATE_PIPELINE (section 3.1.5.4.10), GET_AVAILABLE_RUNSPACES (section 3.1.5.4.11), RUNSPACEPOOL_HOST_RESPONSE (section 3.1.5.4.16), PIPELINE_INPUT (section 3.1.5.4.17), END_OF_PIPELINE_INPUT (section 3.1.5.4.18), and PIPELINE_HOST_RESPONSE (section 3.1.5.4.28).