Product SiteDocumentation Site

4.3. Inbound Bridging

To use the inbound bridge, register the JAX-WS handler into the handler chain of any Web Service as follows:
Example 4.1.  Registering the handler for Inbound Bridging
<handler-chain>
  <protocol-bindings>##SOAP11_HTTP</protocol-bindings>
  <handler>
    <handler-name>TransactionBridgeHandler</handler-name>
    <handler-class>org.jboss.jbossts.txbridge.inbound.JaxWSTxInboundBridgeHandler</handler-class>
  </handler>

  <handler>
    <handler-name>WebServicesTxContextHandler</handler-name>
    <handler-class>com.arjuna.mw.wst11.service.JaxWSHeaderContextProcessor</handler-class>
  </handler>
</handler-chain>

The web service may then operate as though running in the scope of a JTA transaction, as indeed it is. For example, it can call (or indeed simply be) an EJB3 business logic method annotated with @TansactionAttribute(TransactionAttributeType.MANDATORY).
Note that the handlers expect a WS-AT transaction context to be present on all inbound invocations. If you wish deploy your service in such a way as to make transactional invocation optional, you must expose it though two different endpoints, one transactional and one not, with the handlers registered only on the former. This limitation may be addressed in future versions.