I am developing a jax-ws web service proof of concept in RAD 8.0.4 and running in WebSphere 7. Our app uses Spring and Hibernate, but we're not exactly experts in either. We need to enable global transactions with our web service so it can work with the transactions of client apps. I followed the insctructions I found on various websites, including IBMs, and I thought I configured everything and it doesn't work. Each transaction (client and service) work fine independently, but I forced an exception before commit in my client. This rolls back the client transaction, but not the service transaction. Furthermore, the logging on websphere (not the simply systemout one...the trace from the admin console) spits out some gobbledy-gook that implies to me that no transaction context was offered from the client.
I initially set the policies in both the services view of RAD and the admin console, but I've since read that if you set both, it doesn't work. But I have since tried just one and just the other and neither work. Here's what i did:
In my wsdl I added:
and the wsp:PolicyReference line
In the admin console version, after importing the WS-Transaction policy, I navigated to Services->Service Providers->TxService, and selected the checkbox of all three level, TxService, TxPort, and insertDBTrans. Chose Attach Policy Set->WSTransaction. Click the disabled link on the service, and chose 'exported WSDL'. Ok & Save.
Then to Services->Service Clients->TxService. Check client, Attach Client Policy Set->WSTransaction. Client and provier policy chosen.
But that didn't work. So I remove them, and instead go into the services view of RAD. Right clicked on the service, manage policy sets. Put WSTransaction on the first page with Provider Sample as binding attached. It's set all the way down to the operation name - insertDbTrans.
Under the client in the services view I set the client to user provider policy, second page, chose WSTransaction for the default entry and it set to "client and provider".
I actually tried more permutations than this. But none of them worked.
Any ideas what I am doing wrong here? Or at least a narrowing down of the general problem? Am I close to right?
posted 7 years ago
Even if people don't necessarily know the answer, if you know enough to tell me that I am hitting the right switches or not? Am I close? Is there some major piece I didn't talk about or overlooked? I am using an XA data source. Db2 9.5.