This demo shows how to use the Web Service Assembler (WSA) to expose JMS Queues as Web Services. The JMS Queues are consumed by a Message Driven Bean.
To run this demo, you need to deploy the following JMS queues by using a deployment tool or by editing the jms.xml file located under j2ee/home/config directory. You can use the jms.xml file in this sample directory as a template:
Ensure that you have installed the required software and set up your environment. Before running the example, you must deploy the JMS queues mentioned above. You must have OC4J running. If it is not running on your localhost on port 8888, you will have to modify the ANT script (build.xml) to use the correct host and port to your server. Once you have the JMS Queues deployed and OC4J running, you can type "ant" to run the example.
Step By StepRun WSA to create a Web Service application ear from the config file service-config.xml which contains JNDI information on JMS queues:
% ant wsa-jms-ws
This should result in a webservices application file: build/jms_service.ear
NOTE: this ant target also creates a jar file included in the jms_service.ear file. This jar file contains a Message Driven Bean for consuming the JMS Queues.
Deploy and bind the JMS Web Service application:
% ant deploy-jms-ws
Visit the http test pages to ensure that the application has been deployed properly:
To run the client, issue:
% ant run-jms-ws-client
You should see result like:
JmsClient: employee JmsClient: name: JmsHello JmsClient: emp_id: 123 JmsClient: position: WebServices
NOTE: The client code is oracle.demo.corba.HelloClient under client-src directory. In order to compile and run this class, client-side stubs(proxy) need to be generated and compiled into client's classpath. The ant target run-corba-hello-client does all of these. The script runs wsa with the config file stub-config.xml to generate the client proxy.