NonStop SOAP 4.1 User's Manual

Figure 17 Beginning a New Transaction
Request to begin
a transaction
Transaction ID
TMF
Command = “Begin”
Transaction ID
Invoke Service
Response
SOAP
Client
NonStop
SOAP 4
Server
NonStop
SOAP 4
Service
When beginning a new TMF transaction, NonStop SOAP 4 performs the following activities:
1. The NonStop SOAP 4 server begins a new TMF transaction on behalf of a client request and
optionally sets a value for the transaction timeout in its call to TMF. The timeout value used
depends on whether the client has set the TimeOut attribute in the SOAP request header
block, and also if there is a value set for the TMFTimeout attribute in the services.xml
configuration file.
For more information about TMF transaction timeout, see “Transaction Timeouts (page 246).
2. If the SOAP message body contains a request, NonStop will invoke it under the new TMF
transaction. When the service returns control back to NonStop SOAP, or if the body of the
request is empty, NonStop SOAP suspends the new TMF transaction and returns the TMF
transaction ID in the TransactionID attribute in a Transaction header block in the SOAP
response message back to the client. This value can then be used by the client in a subsequent
request to continue the transaction. The value of the TransactionID attribute is in an external
ASCII form. To convert the value to the internal form displayed in TMFCOM, use the
SoapAdminCL tool with the t option.
For information on the SoapAdminCL tool, see “NonStop SOAP Tools” (page 194).
3. If the invoked service returns a fault and the AbortTransactionOnFault attribute is set
to no, the NonStop SOAP server suspends the TMF transaction (it does not abort the transaction)
and returns the TMF transaction ID in the TransactionID attribute in a Transaction header
block along with a SOAP fault. This allows the SOAP client to decide the appropriate error
handling and control whether the transaction should be aborted, or the operation retried.
For more information about configuring the AbortTransactionOnFault attribute, see
“Configuring Transactions to Abort on Fault” (page 248).
NOTE: The NonStop SOAP 4 server recognizes that the application has returned a fault
using the Response Selection Criteria specified in the services.xml file. The NonStop SOAP
4 server upon receiving the response buffer from the application, processes it based on the
response selection criteria to derive the appropriate response structure to be used. Therefore,
when the NonStop SOAP 4 server deduces that the matching response structure is indeed a
Fault response, it prepares a SOAP fault envelope and returns it back to the client.
For example, in case of the EmpInfo operation of the employee_db service, the service
returns a fault when it is queried for a non-existent employee. In such a scenario, the response
buffer’s first two bytes carry the value 01. The corresponding response selection criteria,
specified in the services.xml file, instructs the NonStop SOAP 4 server to select the Fault
response structure when the first two bytes of the response buffer are 01. The NonStop SOAP
4 server then prepares a fault response.
240 Transaction Management