NonStop SOAP 4.1 User's Manual

12 Transaction Management
As a value-added feature, NonStop SOAP 4 provides comprehensive support for Web services
that implement transactions. A transaction, in this context, is defined as a series of logical operations
against a database resulting from the receipt of one or more SOAP messages. All database changes
must be done in their entirety, or all must be backed-out, to ensure that the database is in a consistent
state once the transaction is complete.
NonStop SOAP 4 is fully integrated into the HP Transaction Management Facility (TMF) product,
which is used to ensure database integrity. To use the transaction management feature of NonStop
SOAP 4, TMF must be installed and running on your NonStop system. For more information about
TMF, see the TMF Reference Manual.
You can perform a simple logical transaction by invoking an operation requested by a single SOAP
message, or a more complex logical transaction can result from many SOAP requests that can
span multiple invocations of the same or different operations within any service (a multi-step
transaction).
For a simple transaction, the boundary of the transaction is confined to the processing of a single
SOAP message; it starts with the invocation of the operation and ends when the operation is
complete and control returns back to NonStop SOAP 4. Thus, NonStop SOAP 4 can begin and
end the transaction as a part of processing that SOAP message; that is, SOAP Server Transaction
Management. NonStop SOAP 4 requires an indication that the operation requires transaction
protection, which can be done by setting the TMFTransactionSupport attribute in the
services.xml configuration file (for information on the TMFTransactionSupport attribute,
see “Configuring the Level of Transaction Support” (page 245)). For a multi-step (or complex)
transaction, NonStop SOAP 4 requires some help from the SOAP client to indicate that a particular
SOAP message is starting a transaction, and to subsequently signal when that transaction should
be ended; that is, SOAP Client Transaction Management.
All the semantics for the SOAP Client Transaction Management are contained in a Transaction
Header Block that may be sent in a SOAP message. The client can set the values of a Command
attribute to start or end a transaction, and indicate that an existing transaction should be continued
or aborted. In addition, the client can use another attribute to control the transaction timeout values.
The TransactionID attribute coordinates between the client and NonStop SOAP 4, and is set
to a unique value by NonStop SOAP 4 when a transaction is started. The TransactionID
attribute is subsequently used as a handle that is passed back and forth between the client and
server to associate SOAP messages to particular transactions.
The following attributes can be set in the services.xml file to define the kind of transaction
support requested of the NonStop SOAP 4 server:
TMFTransactionSupport
AbortTransactionOnFault
TMFTimeout
236 Transaction Management