Forum Discussion

jaxwsattest's avatar
jaxwsattest
New Contributor
8 years ago

JAX-WS with Mandatory Atomic Transaction in SOAPUI

Hi,

 

I have a JAX-WS Web Service which has WS-AT (Atomic Transactions) defined for transaction like below in implementation class,

 

    @Transactional(value = Transactional.TransactionFlowType.MANDATORY,
                   version = Transactional.Version.DEFAULT)
    @TransactionAttribute(TransactionAttributeType.REQUIRED)

 

I have defined these annotations at the method level. I have a simple Servlet Client code which does the transaction creation like below,

 

ctx = new InitialContext();
utx = (UserTransaction) ctx.lookup("javax.transaction.UserTransaction");

 

With the above code, the servlet client code is able to invoke my Web Service. If i do the same through SOAPUI, i get the error stating

 

"transaction context is required to be inflowed"

 

This error is understandable as it expects the transaction from the client side which in this case, it is SOAPUI.

 

I tried to populate the "setup script" and "teardown script" but it expects the groovy script and does not accept the user transaction. Any suggestions on how to invoke the Web Service with transaction?

No RepliesBe the first to reply