<transactionControl> element |
Top Previous Next |
This presence of this element indicates that the server associated with the parent <method> will participate in a NonStop TM/MP (TMF) transaction. The attributes of the element indicate which party, client or server, may control the transaction. If the server controls the transaction, this element specifies the conditions under which the transaction should be committed or aborted.
Attributes
Remarks If clientControl="1", a <header> or a <parameter> of type txControlRequestType must be defined for the request and of type txControlResponseType for the response in the parent <method> of this <transactionControl> element.
If serverControl="1" and clientControl="1", the client controls the transaction if and when it supplies a txControlRequestType header in its method call (SOAP request), otherwise SOAP/AM Server will control the transaction.
If serverControl="0" and clientControl="1", but the client does not supply a txControlRequestType header or parameter in its method call (SOAP request), no transaction control takes place.
If serverControl="0" and clientControl="0", then no transaction control takes place. This is effectively the same as the <transactionControl> element not being present.
When SOAP/AM Server controls the transaction, it begins a new transaction prior to sending the request interprocess message to the target server and ends the transaction when the target server replies. Thus, a server-controlled transaction consists of exactly one request-response. To span a single transaction over multiple method (SOAP request-response) calls, you must use client-controlled transactions.
See Managing Transactions and Client Transaction Control for more information. Examples <method name="debitAccount" server="debitAccountServer"> <headers> <!-- web service client will send a SOAP header at runtime containing transaction control elements --> <header name="txRequest" type="txControlRequestType" namespace="http://soapam.com/types/" direction="in" /> <header name="txResponse" type="txControlResponseType" namespace="http://soapam.com/types/" direction="out" /> </headers> <parameters> <parameter name="requestMsg" type="ipm_debit_account_request" direction="in" /> <parameter name="replyMsg" type="ipm_debit_account_reply" direction="out" /> </parameters> <!-- web service client will control the transaction --> <transactionControl serverControl="0" clientControl="1" /> <request type="ipm_debit_account_request"> <mappings> <mapping name="requestMsg" element="." /> </mappings> </request> <replies> <reply type="ipm_debit_account_reply" replyCode="*"> <mappings> <mapping name="replyMsg" element="." /> </mappings> </reply> </replies> </method>
|