NonStop SOAP 4.1 User's Manual
Example 29 Commit a Transaction within a Session
Client Request
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:compaq_nsk_oss_SoapHeader">
<soapenv:Header>
<urn:Session SessionID="234567"
CurrentTransactionCommand="Commit"/>
</soapenv:Header>
<soapenv:Body>
.
.
.
</soapenv:Body>
</soapenv:Envelope>
NonStop SOAP 4 Response
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:compaq_nsk_oss_SoapHeader">
<soapenv:Header>
<urn:Session SessionID="Tempmj12rty67"/>
</soapenv:Header>
<soapenv:Body>
.
.
.
</soapenv:Body>
</soapenv:Envelope>
where,
234567
is the TMF transaction identifier of the transaction to be committed.
NOTE: The SOAP request to commit a transaction can also be combined with a request to end
the session.
Abort a Transaction within a Session
To abort an active transaction, the client must set the value of the CurrentTransactionCommand
attribute to Abort in the session header block and provide the appropriate SessionID – that is,
the SessionID value supplied in the previous response from NonStop SOAP 4 for this session.
On receiving a SOAP request to abort an active transaction under a session:
1. The SOAP server resumes the TMF transaction specified in the SessionID attribute of the
session header block of the SOAP request header element.
2. The SOAP server aborts the TMF transaction.
3. If the SOAP message body requests a target service, it will be invoked but there will not be
any active TMF transaction because it has been aborted in step 2.
4. Because the previous value for SessionID is no longer valid (the transaction ID it represents
has been aborted), the SOAP server generates a temporary session identifier to set in the
SessionID attribute, and returns it in the session header block in the response message.
Example 30 shows a request/response pair of messages to abort a transaction within a session.
Session Management and Transactions 255










