29.01.2013 Views

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

WebSphere Application Server V7.0: Concepts ... - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

provided by the Service 2 Producer component has to relate a message it<br />

receives to the corresponding message that was sent by the Service 1<br />

Consumer component.<br />

Technically, this message exchange pattern is the same as the one-way pattern,<br />

with the additional requirement that there has to be a mechanism to associate<br />

response messages with their corresponding request message. This can be<br />

done at the application level or by using SOAP protocol.<br />

Service 1<br />

Consumer<br />

Service 2<br />

Producer<br />

Figure 11-4 Asynchronous two-way message exchange pattern<br />

Request-response<br />

Probably the most common message exchange pattern, a remote procedure call<br />

(RPC) or request-response pattern, involves a request message and a<br />

synchronous response message (Figure 11-5). In this message exchange<br />

pattern, the underlying transport protocol provides an implicit association<br />

between the request message and the response message.<br />

In situations where the message exchange pattern is truly synchronous, such as<br />

when a user is waiting for a response, there is little point in decoupling the<br />

consumer and producer. In this situation, the use of SOAP/HTTP as a transport<br />

provides the highest level of interoperability. In cases where reliability or other<br />

quality of service requirements exist (such as prioritization of requests),<br />

alternative solutions might have to be sought.<br />

Service<br />

Consumer<br />

Figure 11-5 Request-response message exchange pattern<br />

Service 1<br />

Producer<br />

Service<br />

Producer<br />

There are numerous examples of this message exchange pattern, for example,<br />

requesting an account balance on a bank account.<br />

Chapter 11. Web services 367

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!