We have never used the WS-Transaction policy before in Websphere, therefore I am in the process of developing a prototype to evaluate it.
This is how the prototype is structured. I have developed two applications, APP_A and APP_B using eclipse.
- APP_A contains two JAXWS web services, service_X and service_Y
- service_X accepts minimal data, writes it to a table on an oracle database and then returns the primary key in the response
- service_y accepts the primary key returned from service_X and some other minimal data, writes it to a different table on the same oracle database and then returns the primary key in the response
- APP_B contains one JAXWS web service, service_Z
- service_z accepts all data required to post a request to service_x and service_y, and does so returning both primary keys returned from service_x and service_y in its response
both APP_A and APP_B are deployed to Websphere 8.5.5.9, and have been tested successfully.
Then via the Websphere admin console, I created a new application policy set and included the ws-transaction policy. I then attached this policy to the provider policies within APP_A and the client policies within APP_B, and then restarted Websphere.
I then submitted a request to APP_B, from the log files I can see that the request is being successfully received by service_z in APP_B, but when it attempts to post a request to service_x in APP_A the following error is reported:
[02/06/16 11:53:43:040 BST] 00000076 AxisEngine E org.apache.axis2.engine.AxisEngine receive WTRN0127E: Operation blocked by policy type configuration.
I have followed several online articles from IBM developer works that all imply everything should work by just applying the policies via the admin console, but unfortunately I still encounter this error.
I suspect that I may need to include something within the header of the service call, but I am not sure what this is or how to achieve it.
One of the articles suggested using the IBM Rational Application Developer tool, exporting the policies from the admin console and then importing them into the project prior to deployment. I tried this using IBM RAD 9.11 as per the instructions, but it still does not resolve the issues.
Any help/advice would be appreciated, thanks in advance for your help.