3.3.5.2 RECEIVE_SM
The RECEIVE_SM event MUST be signaled by the underlying transport protocol with the following arguments:
The Server Message argument.
If the RECEIVE_SM event is signaled, the client role implementation MUST perform the following actions:
If the server message is a Context Participating Message:
Create the context identifier from the Context Participating Message by performing the following steps:
If the server message is a SOAP envelope:
Create a context identifier that is isomorphic with the SOAP header from the server message that matches the CONTEXT_XML element.
Otherwise:
Return an implementation-specific failure result to the higher-layer business logic.
Invoke a function in the higher-layer business logic that accepts the created context identifier and the value from the Context Identifier Store field and returns one of two values: PARTICIPATE or FAIL.
If the value that is returned from the higher-layer business logic is PARTICIPATE:
Provide the client message to the higher-layer business logic.
Otherwise:
Return an implementation-specific failure result to the higher-layer business logic.
Invoke a function in the higher-layer business logic that accepts the server message and returns a (possibly empty) collection of correlated client messages using a correlation mechanism that is supplied by the underlying transport protocol.
For each client message in the collection of the client messages:
Send the client message to the server role by using the underlying transport protocol.