Configure a permanent replyTo queue for JAX-RPC web services using SOAP over JMS (deprecated)
When using two-way web service communications using the IBM proprietary SOAP over JMS transport, we can benefit from configuring a permanent replyTo queue on JAX-RPC web services client to prevent the client from having to create a temporary reply queue each time a web service request is made.
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
A permanent replyTo queue is configured on the web services client in one of the following ways:
- Specify the optional replyToDestination property in the JMS endpoint URL.
- Set the replyTo queue programmatically on the client JAX-RPC Stub or Call object. Setting the replyTo queue as a Stub or a Call property affects all requests invoked using that Stub or Call object.
- Set the replyTo queue as a JVM system property. Setting the replyTo queue as a JVM system property affects all of our SOAP over JMS clients running in the particular JVM. If there are multiple clients in the same application that need to use a different replyTO queue, then the best option is to set the property programmatically.
To set the permanent replyTo queue using any of these options, only client-side configuration is necessary. There is no configuration necessary on the web service provider side.
Tasks
- Specify the optional replyToDestination property in the JMS endpoint URL.
jms:/queue?destination=jms/MyRequestQueue&connectionFactory= jms/MyCF&replyToDestination=jms/MyReplyQueue&targetService=MyService- Set the replyTo queue programmatically on the client JAX-RPC Stub or Call object.
The client uses the JAX-RPC Stub or Call object to invoke the web service.
((javax.xml.rpc.Stub)stub)._setProperty(com.ibm.wsspi.webservices.Consta nts.JMS_REPLY_QUEUE_JNDI_NAME, "jms/Permanent_Q");The value of the property is a String.
- Set the replyTo queue as a JVM system property.
- For a Java client invocation, enter at a command prompt:
java -Dcom.ibm.websphere.webservices.JMSReplyQueueJndiName=jms/Permanent_Q
- For a JVM running on the application server:
- Set a JVM system property using the administrative console for the application server which runs the web service client application.
To set custom properties, connect to the administrative console and navigate to the Java virtual machine custom properties panel.
- Click Servers > Server Types > WebSphere application servers > server > Java and Process Management > Process Definition > Java Virtual Machine > Custom Properties > New
- Set the Name property to: com.ibm.websphere.webservices.JMSReplyQueueJndiName
- Set the Value property to: jms/Permanent_Q
- Click OK to save the changes.
- Click Synchronize changes with Nodes and click Save.
- Restart the application server.
Your web services client can now receive IBM proprietary SOAP over JMS messages from a permanent replyTo queue.
Use SOAP over JMS to transport web services Task overview: Implementing web services applications Java virtual machine custom properties IBM proprietary SOAP over JMS protocol (deprecated) SOAP over JMS protocol IBM proprietary JMS endpoint URL syntax (deprecated)