SOAP Over JMS using Java EE Service Engine
EE Service Engine, part of href="https://glassfish.dev.java.net/">GlassFish project, is a href="http://www.jcp.org/en/jsr/detail?id=208">JSR 208
compliant component which along with JMS Binding component from href="https://open-esb.dev.java.net/public/download.html">openESB
can be used to achieve SOAP over JMS.
alt="SOAP over JMS is achieved using Java EE Service Engine and JMS Binding combination"
style="width: 586px; height: 688px;">
In the above diagram one GlassFish instance, Instance 1, is
acting as a Web Service consumer while the other
(Instance 2) acts as a Web Service Provider. Following is
configuration details of both the instances
Instance 1 :
Software requirements : GlassFish with mqbroker listening at port 7676,
Make sure that JSR 208 compliant components, Java EE Service
Engine and openESB's JMS Binding are installed
1. A web application acting as a web service (CalculatorService)
consumer is deployed on GlassFish with jbi-enabled
flag for the port set to true, so that the outgoing web service request
is routed through Java EE Service Engine.
2. JMS Binding provider deployment for web service deployed on Instance
1. Two physical queues - RequestQueue and ResponseQueue are created
2. Administered objects for connecting to the Message Provider with
broker at 7676 for QueueConnectionFactory
and Queue destination are created.
Instance 2 :
Software requirements :
1. GlassFish connecting to instance1's mq broker listening at
2. openESB product
JSR 208 compliant components : Java EE Service Engine and
openESB's JMS Binding
1. A web application exposed as a web service - CalculatorService
consumer is deployed on GlassFish . Endpoint for the
CalculatorService is automatically activated in NMR at the time of
deployment of the web app.
2. JMS Binding consumer deployment for the web service
1. Administered objects for connecting to the Message Provider with
broker at instance1:7676 for
QueueConnectionFactory is created.
How does it all work :
A servlet deployed on instance1 invokes a add operation on
CalculatorService deployed on instance2. Since jbi-enabled
flag for the port is set to true, Java EE Service Engine delivers this
web service request to Normalized Message Router (NMR) .
JMS Binding on instance1 which has a provider deployement for
CalculatorService puts the content of the Normalized Message,
a TextMessage, into RequestQueue . JMS Binding on instance 2 is acting
as a consumer for the messages in RequestQueue
and hence picks up the TextMessage from the queue, bundles it in
a Normalized Message format and delivers it to NMR.
The normalized message is delivered to Java EE Service Engine on
instance 2 which acts as a provider for CalculatorService .
Java EE Service Engine invokes the endpoint's add operation. Java EE
Service Engine bundles response of add operation in a
normalized message and delivers to NMR. NMR delivers this message to
JMS Binding on instance2 which extracts contents
of the response message and put it in ResponseQueue. JMS Binding
on instance 1 is listening to messages in ResponseQueue.
Thus, it picks up the response from the queue and delivers it to NMR
which in turn delivers it to Java EE Service Engine and
hence to the servlet which was acting as a consumer.
The entire working scenario described above with executable ant targets
is available at