The following steps describe how the MDB-based JMS endpoint Web service application illustrated in the figure works.
A Web service client sends a SOAP request to invoke the send
operation on the JMS endpoint Web service.
The JMS endpoint Web service processes the incoming message and directs it to a JMS destination, JMS Destination 1
.
The EJB container invokes the MDB listening on JMS Destination 1
.
After processing the message an MDB produces a new message on JMS Destination 2
. Producing and consuming messages could involve one or more MDBs. For example, a single MDB could be listing on JMS Destination 1
and the same MDB could also send the message to JMS Destination 2
.
(Arrows 5 and 6) A Web service client sends a SOAP request to perform a receive
operation on the JMS endpoint Web service to retrieve a message. The JMS endpoint Web service consumes a message from the JMS destination, encloses it in a SOAP response message, and passes the outgoing SOAP response message to the client.