The Middleware as Platform for IT Application Services
OpenSOAP Transaction Document
The Transaction Management Service can be found at src/tools/Transaction in the OpenSOAP package distribution.
Simply, the OpenSOAP Transaction Service (transaction service) is realized as a 2-phase commitment transaction as outlined in the following procedure.
The Transaction Service has the following characteristics.
OpenSOAP Transaction Overview
To use the Transaction Service, the client and the services connected to the Transaction Service must be compatible with the Transaction Service.
2. Client Specification (Request Message)
The client must be capable of sending a request message in accordance to the following specifications.
2.1. Transaction Control Description Block
The first Bodyblock <TransactionControl> contained in the Body of the request message (<SOAP-ENV:Body>) is required (Ex. 1).
It is desireable that the namespace of the <TransactionControl> Block be set to "http://services.opensoap.jp/transaction/".
2.2. Transaction Header Block
If message header part that is to be sent to each service exists, then the transaction header block <TransactionHeaderBlock>
elements can be defined(Ex. 1). The elements defined in this part are included as the SOAP message header block
(immediately below the <SOAP-ENV:Header> block) to be sent to each service. It is desired that namespace of the
<TranscationHeaderBlock> be set to "http://services.opensoap.jp/transaction/".
2.3. Transaction Body Block
The message body part that should be sent to each of the services, is defined as transaction body block <TransactionBodyBlock> element. The elements defined in this part are inserted as SOAP message body blocks (immediately below the <SOAP-ENV:Body> block)to be sent to each service. It is desired that namespace of the <TransactionBodyBlock> be set to "http://services.opensoap.jp/transaction/". It is required that corresponding <endpoint> "transactionRequestID" attribute value of the <TransactionControl> block be added to each <TransactionBodyBlock>. As for the <TransactionHeaderBlock>, in the <TransactionBodyBlock>, 2nd and successive Bodyblock ordering is irrelevant.
Ex. 1. OpenSOAP Transaction Request Envelope
3. Transaction Compatible Service Specification
The services relevant to the OpenSOAP Transaction Service, the specification for the client generated SOAP message (Header Block, Body Block Content), and the service functions made available to the client along with connecting to the transaction service must comply with the specification listed below.
3.1. Request Processing Response
Every Envelope, generated seperately according to the transaction service(Ex. 2) is sent to its corresponding endpoint.
Every service performs its request processing according to the Envelope, saves the process status so a Rollback is possible,
and returns a response message(Ex. 3) to the transaction service.
Ex. 2. The SOAP Envelope sent to Bank A after a division of the request message
Ex. 3(A). Example response from Bank A
Ex. 3(B). Example of communication with Bank B
3.2. COMMIT or ROLLBACK request
On receiving a successful response("SUCCESS") from the service process, the transaction service sends the next request
to the corresponding service in the order defined by the <TransactionControl> Block.
3.3. Process Conclusion
On receiving a COMMIT request, the service executes the requested operation and terminates. On receiving a ROLLBACK request, the service deletes the requested operation and does not execute it. Furthermore, the transaction service returns a SOAP message indicating the outcomes of all completed processes.
Ex. 4. COMMIT Request to Bank A from transaction service
4. Client Response
The transaction service combines the results of a series of process into 1 Envelope (Ex. 5), ans is returns it to the client.
The first Body Block of the SOAP Message, the <TransactionResponse> BLOCK, contains an account of the overall result of the
transaction and is indicated as a COMMIT or ROLLBACK.
Subsequent Body Blocks are comprised of the corresponding blocks returned from each of the services as follows:
Response Message Header Block ->
Ex. 5 The transaction process result returned to the client.
Copyright (C) 2001-2004 Webmasters of www.opensoap.jp. All Rights Reserved.