3.1.5.1 RECEIVE_SM
The RECEIVE_SM event MUST be signaled by the underlying transport protocol with the following arguments:
The Server Message argument.
The Protocol argument with two possible values: HTTP or SOAP.
The ServerMessageExpected argument with two possible values: true or false.
If the RECEIVE_SM event is signaled, the client role implementation MUST perform the following actions:
If the State field is WAIT_CORRELATED_SM:
If the server message is a Server Context Establishing Message:
Create the context identifier from the Server Context Establishing Message by performing the following steps:
If the Protocol value is HTTP and the server message contains an HTTP Server Message Header:
Create a context identifier that is isomorphic with the HTTP Server Message Header from the server message.
Else if the Protocol value is SOAP and the server message contains a SOAP header that matches a CONTEXT_XML element:
Create a context identifier that is isomorphic with the SOAP header from the server message that matches a CONTEXT_XML element.
Otherwise:
Set the State field to ENDED.
Return an implementation-specific failure result to the higher-layer business logic.
Set the Context Identifier Store field to the value of the created context identifier.
Provide the server message to the higher-layer business logic.
Otherwise:
Set the State field to ENDED.
Return an implementation-specific failure result to the higher-layer business logic.
Otherwise:
If the server message is a Server Context Establishing Message:
Set the State field to ENDED.
Return an implementation-specific failure result to the higher-layer business logic.
Otherwise:
Provide the server message to the higher-layer business logic.
If the ServerMessageExpected value is true:
Set the State field to WAIT_SM.
Otherwise:
Set the State field to IDLE.