Oracle GlassFish Message Queue 4.4.2 Developer's Guide for Java Clients

SOAP Messaging Programming Models

This section provides a brief summary of the programming models used in SOAP messaging using SAAJ.

A SOAP message is sent to an endpoint by way of a point-to-point connection (implemented by the SOAPConnection class).

You use point-to-point connections to establish a request-reply messaging model. The request-reply model is illustrated in Figure 5–6.

Figure 5–6 Request-Reply Messaging

Diagram showing the client sending a message to an endpoint
that receives the message, processes it, and then returns to the sender.

Using this model, the client does the following:

It is assumed that the client will ignore the SOAPMessage object returned by the call method because the only reason this object is returned is to unblock the client.

The SOAP service listening for a request-reply message uses a ReqRespListener object to receive messages.

For a detailed example of a client that does point-to-point messaging, see Writing a SOAP Client.