Invoking one-way JAX-RPC web service requests transactionally using the JMS transport (deprecated)
Use the enableTransactionalOneWay property to ensure that one-way JAX-RPC web service requests using the IBM proprietary JMS transport will be sent to the destination queue or topic transactionally.
Deprecated feature: Beginning with WebSphere Application Server 7.0, the IBM proprietary SOAP over JMS protocol is deprecated in favor of the emerging industry standard protocol. Use the IBM proprietary SOAP over JMS protocol with the JAX-WS or JAX-RPC web services, however, we are encouraged to take advantage of the SOAP over JMS protocol standard. This task describes configuring a permanent replyTo queue when using the IBM proprietary SOAP over JMS transport. To learn more about the SOAP over JMS standard, see the using SOAP over JMS to transport web services documentation.depfeat
When using JMS to transport web service requests, the default behavior is for the SOAP message to be added to the destination queue or topic non-transactionally or outside of the client application's transaction. Adding the SOAP message to the destination queue or topic is done outside of the transaction to avoid synchronization problems that can occur with two-way web service requests. However, we can choose to enable one-way requests to be processed as part of the transaction. The enableTransactionalOneWay property can be used to ensure that one-way web service requests that use the JMS transport will be sent to the destination queue or topic transactionally. When the client application invokes the one-way web service request, the resulting SOAP request message is added to the destination queue or topic as part of the client application's transaction.
Using one of the following ways to enable the enableTransactionalOneWay property.
Tasks
- Set the enableTransactionalOneWay property programmatically on the client JAX-RPC Stub or Call object.
When using a static Stub to invoke the web service operation, set the enableTransactionalOneWay property on the Stub object before invoking the web service method. When using a Call object to invoke the web service operation, set the enableTransactionalOneWay property on the Call object before invoking the invokeOneWay() method.
Service service = /* Obtain the desired service */ yStub stub = service.getPort(); /* Set enableTransactionalOneWay property on Stub */ stub._setProperty(com.ibm.websphere.webservices.Constants.ENABLE_TRAN_ONEWAY, new Boolean(true)); /* Invoke the one-way operation */ stub.myOneWayOperation("Parm1");The value of the property is Boolean.
- Set the enableTransactionalOneWay property as a custom property in the ibm-webservicesclient-bnd.xmi deployment descriptor file using the wsadmin command.
For more information about the wsadmin tool options, see the options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands information.
Use the $AdminApp object along with the -WebServicesClientCustomProperty option to set the value of the property within the client binding file, ibm-webservicesclient-bnd.xmi. The value of the custom property, enableTransactionalOneWay, is either true or false.
- Use Jacl:
$AdminApp edit MyApplication {-WebServicesClientCustomProperty {{MyEJBJar.jar MyEJB service/MyServiceRef MyPort enableTransactionalOneWay true}}}
- Use Jython:
AdminApp.edit('MyApplication', ['-WebServicesClientCustomProperty', [['MyEJBJar.jar', 'MyEJB', 'service/MyServiceRef ', 'MyPort', 'enableTransactionalOneWay', 'true']]])
We have a web service client application configured to invoke one-way requests transactionally while using the JMS transport.
What to do next
After we have enabled the enableTransactionalOneWay property, run the client application.
Use SOAP over JMS to transport web services Task overview: Implementing web services applications Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands IBM proprietary SOAP over JMS protocol (deprecated) SOAP over JMS protocol