The following steps describe how the MDB-based JMS endpoint Web service application illustrated in the figure works.

  1. A Web service client sends a SOAP request to invoke the send operation on the JMS endpoint Web service.

  2. The JMS endpoint Web service processes the incoming message and directs it to a JMS destination, JMS Destination 1.

  3. The EJB container invokes the MDB listening on JMS Destination 1.

  4. 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.

  5. (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.