NonStop SOAP User's Manual
NonStop SOAP Features and Functions
NonStop SOAP User’s Manual—520501-012
4-4
Subsessions
When a client requests a session, the SOAP server returns a session ID. Thereafter,
any request that includes the session ID is regarded as belonging to the same session.
Similarly, in the response from a service, the SOAP server includes the session ID,
unless the response signifies the end of the session.
A client can issue requests to multiple services within a session by including the same
session ID in each request.
Furthermore, a SOAP server can support multiple sessions simultaneously. For
example, between requests that include the same session ID, a request could arrive
with another session ID. In such a case, the SOAP server handles the requests in
order of arrival, associating each request with the corresponding session context.
Subsessions
Within a session, the client can conduct one or more subsessions. A subsession
causes the SOAP server to maintain a dialog with a context-sensitive server class.
Subsessions cannot overlap: they must occur one after another. Therefore, a client
could conduct a subsession resulting in a dialog with target server A, then a
subsession resulting in a dialog with target server B, then another subsession resulting
in a dialog with target server A. Both sets of interactions with target server A can occur
during the same session, but each set of interactions is a separate subsession.
The SOAP server starts a subsession automatically when a client issues its first
request for a context-sensitive service. Thereafter, all requests for the same service
belong to the subsession. The subsession ends when the client explicitly aborts it or
when the target service ends the dialog with the server class.
The SOAP server informs the client that a subsession is in progress by including the
Subsession attribute, with the value “on,” in each response header. A response that
does not contain the Subsession attribute indicates that no subsession is in progress,
perhaps because the session was aborted by the client, or the target service has no
more data to send.
All requests within a subsession must be handled by the same SOAP server process.
For examples of subsessions, see Examples 5 and 6: Sessions with Context-Sensitive
Services on page 6-30.
Starting a Session
To start a session, the client sends a SOAP message, specifying a value of “Begin” for
the SessionCommand attribute of the Session element of the SOAP header.
Note. If a SOAP server encounters a fault condition before processing the Session element of
the NonStop SOAP header, the session ID is also absent in the response. Alternately, a SOAP
fault response with a session ID present implies that the SOAP server has successfully
processed the Session element and its associated transaction attributes, unless the fault
message indicates an error in the Session element.