background image

Coffee Break Application Flow

<< The Coffee Break Application | JAX-WS Coffee Supplier Service >>
<< The Coffee Break Application | JAX-WS Coffee Supplier Service >>

Coffee Break Application Flow

The Coffee Break server obtains the coffee varieties and their prices by querying suppliers at
startup and on demand.
1. The Coffee Break server uses SAAJ messaging to communicate with one of the suppliers.
The Coffee Break has been dealing with this supplier for some time and has previously made
the necessary arrangements for doing request-response SAAJ messaging. The two parties
have agreed to exchange four kinds of XML messages and have set up the DTDs those
messages will follow.
2. The Coffee Break server requests price lists from each of the coffee suppliers. The server
makes the appropriate remote web service calls and waits for the response, which is a
JavaBeans component representing a price list. The SAAJ supplier returns price lists as XML
documents.
3. Upon receiving the responses, the Coffee Break server processes the price lists from the
JavaBeans components returned by calls to the suppliers.
4. The Coffee Break server creates a local database of suppliers.
SAAJ
Coffee Supplier
Web Service
JAX-WS
Coffee Supplier
Web Service
Coffee Break
Server
Coffee Break
Client
request_prices
order_coffee
HTTP
FIGURE 36­1
Coffee Break Application Flow
Overview of the Coffee Break Application
The Java EE 5 Tutorial · September 2007
1030