Determining if the SOAP message is part of an atomic transaction

When a CICS web service is invoked in the atomic transaction pipeline, the SOAP message does not necessarily have to be part of an atomic transaction.

About this task

The <soapenv:Header> element contains specific information when the SOAP message is part of an atomic transaction. To find out if the SOAP message is part of an atomic transaction, you can either:

Procedure

  • Look inside the contents of the <soapenv:Header> element using a trace.
    1. Perform an auxiliary trace using component PI and set the tracing level to 2.
    2. Look for trace point PI 0A31, which contains the information for the request container.
      In particular, look for PIIS EVENT - REQUEST_CNT which appears just before the <cicswsa:Action> element.
  • Use a user-written message handler program in the DFHWSATP pipeline to display the content of the DFHREQUEST container when it contains the data RECEIVE-REQUEST.
    If you opt for this approach, make sure that you define the message handler program in the pipeline configuration file.

Example

The following example shows the information that you could see in the SOAP envelope header for an atomic transaction.
<soapenv:Header>
  <wscoor:CoordinationContext soapenv:mustUnderstand="1">  1 
     <wscoor:Expires>500</wscoor:Expires>
     <wscoor:Identifier>com.ibm.ws.wstx:
        0000010a2b5008c80000000200000019a75aab901a1758a4e40e2731c61192a10ad6e921
     </wscoor:Identifier>
     <wscoor:CoordinationType>http://schemas.xmlsoap.org/ws/2004/10/wsat</wscoor:CoordinationType>  2 
     <wscoor:RegistrationService  3 
        xmlns:wscoor="http://schemas.xmlsoap.org/ws/2004/10/wscoor">
        <cicswsa:Address xmlns:cicswsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
           http://clientIPaddress:clientPort/_IBMSYSAPP/wscoor/services/RegistrationCoordinatorPort
        </cicswsa:Address>
        <cicswsa:ReferenceProperties
           xmlns:cicswsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
               <websphere-wsat:txID
                     xmlns:websphere-wsat="http://wstx.Transaction.ws.ibm.com/extension">com.ibm.ws.wstx:
                     0000010a2b5008c80000000200000019a75aab901a1758a4e40e2731c61192a10ad6e921
               </websphere-wsat:txID>
               <websphere-wsat:instanceID
                     xmlns:websphere-wsat="http://wstx.Transaction.ws.ibm.com/extension">com.ibm.ws.wstx:
                     0000010a2b5008c80000000200000019a75aab901a1758a4e40e2731c61192a10ad6e921
               </websphere-wsat:instanceID>
         </cicswsa:ReferenceProperties>
      </wscoor:RegistrationService>
  </wscoor:CoordinationContext>
</soapenv:Header>
  1. The CoordinationContext indicates that the SOAP message is intended to participate in an atomic transaction. It contains the necessary information for the web service provider to be part of the coordination service, assuming that the provider is configured to recognize and process the header.
  2. The CoordinationType indicates the version of the WS-AT specification that the coordination context complies with.
  3. The coordination RegistrationService describes where the coordinator's registration point is, and the information that the participating web service must return to the coordinator when it attempts to register as a component of the atomic transaction.