Contributions
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?747Views0likes0CommentsRe: How to handle transaction management while invoking webservice?
Thanks Anders. Sorry for the delay. We are using JAX-WS WebService with Atomic Transaction (SUPPORTS type) which in turn uses User Transaction on it as like below, UserTransaction tx = null; try { ctx = new InitialContext(); tx = (UserTransaction)ctx.lookup("javax.transaction.UserTransaction"); The WebService has been deployed successfully on WebLogic 12c server. Now, i am invoking this WebService through SOAP UI tool which in turn calls the WebService correctly. The issue happens only when something fails in middle of business logic. The SOAP UI returns the error that is returned from business logic but the business logic process which happened before the failure gets committed. (PARTIAL COMMIT). So, I need to find the way to rollback the changes through SOAP UI when the API errors.9 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes1CommentHow to handle transaction management while invoking webservice?
We are trying to invoke a JAX-WS webservice through SOAP UI and we are successful with the same. But during the process, if something fails, the SOAP UI does a partial commit meaning it does not do a rollback but instead it does a commit. I need to know how to handle the transaction management. Mainly on how to do a rollback when something fails.9 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes3Comments