NonStop SOAP User's Manual

Using NonStop SOAP with a TS/MP Application and
NonStop Processes
NonStop SOAP User’s Manual520501-012
6-24
Sessions and Transactions with TS/MP Servers and
NonStop Processes
Sessions and Transactions with TS/MP Servers and NonStop
Processes
A SOAP client can initiate a session with target TS/MP servers or NonStop processes.
The SOAP server maintains session context across requests from a client after a
session is initiated.
To begin or end a session, the client uses elements of the NonStop SOAP header, as
described in Session Management on page 4-3.
Within a session, a client can initiate, abort, or commit transactions, also using
elements of the NonStop SOAP header, as described in Transaction Management on
page 4-15.
Sessions and Transactions with Context-Free TS/MP
Servers or NonStop Processes
A client can conduct a session that includes requests to one or more context-free
TS/MP servers or NonStop processes. The SOAP server manages a session across
requests from SOAP clients to context-free TS/MP servers or NonStop processes by
maintaining a session context. The client uses a handle called the session ID to
indicate that a request belongs to an established session.
Within a session, SOAP clients can initiate and control transactions by using attributes
specified in the NonStop SOAP Header. SOAP clients can choose to start a session
and do transaction management by themselves if the logic for processing a reply from
the server is too complex to specify in the Service Map (SDL) file. Multiple transactions
can occur, one at a time, within a session.
The client can establish and maintain transactions only with server classes or
standalone processes that inherit a transaction ID from the requester. (In this case, the
requester is the SOAP server.)
You indicate whether a server class supports client-initiated transactions by using the
TMFTransactionSupport attribute when you define the service in the SDL file. If the
attribute has a value of “yes” for a Service specified in the SDL and the client sends a
request to the service without having begun a transaction, the SOAP server returns a
fault message to the client. If the attribute has a value of “no” and the client begins a
transaction, the SOAP server suspends the transaction and does not report an error.
If a client has begun a session with a context-free TS/MP server or NonStop process,
the AbortTransactionOnFault attribute setting for the service is ignored during that
session.
Example 4: Session with a Context-Free Service
This example illustrates a session between a client and a context-free TS/MP service
defined in the file empsdl.xml in the /samples directory. Session handling when
communicating with a NonStop process is similar to context-free services.