NonStop SOAP 4.1 User's Manual

Example 28 Continue a Transaction
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"/>
</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="234567"/>
</soapenv:Header>
<soapenv:Body>
.
.
.
</soapenv:Body>
</soapenv:Envelope>
Commit a Transaction within a Session
To commit an active transaction, the client must set the value of the
CurrentTransactionCommand attribute to Commit in the session header block and also
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 commit an active TMF transaction:
1. The SOAP server resumes the TMF transaction specified in the SessionID attribute of the
session header block in the SOAP request header element.
2. The NonStop SOAP 4 server invokes the operation (if specified in the body of the request)
under the resumed TMF transaction.
3. If the service does not return a fault, the SOAP server will commit the transaction.
4. If the service returns a fault and the AbortTransactionOnFault attribute is set to yes,
the SOAP 4 server will abort the TMF transaction and return a fault response to the client.
Because the previous value for SessionID is no longer valid (the transaction ID it represents
has been committed), 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
5. If the invoked service returns a fault and the AbortTransactionOnFault attribute is set
to no, the SOAP server suspends the TMF transaction and returns the TMF transaction ID in
the SessionID attribute in a session header block along with a SOAP fault.
Example 29 shows a request/response pair of messages to commit a transaction within a session.
254 Transaction Management