From a Web service use case perspective, XML messaging in the form of SOAP requests, between applications can be either synchronous or asynchronous. Figure 11.5 shows an example of a synchronous message exchange. Flute Bank places an order for office supplies with OfficeMin and sends a purchase order (an XML document). The purchase order maps specifically to the service's logical interface (e.g., an RPC call). OfficeMin's service checks the inventory and verifies all items in the purchase order are in stock. It acknowledges the purchase order by generating an invoice (an XML document) indicating that the order will be shipped. This entire interaction happens in a request-response manner.
An alternative approach, shown in Figure 11.6, also begins with Flute Bank sending a purchase order to OfficeMin. OfficeMin acknowledges it, using a confirmation mechanism (e.g., replying with an email or even a response to the request) indicating that the purchase order was received and is being processed. The purchase order goes though OfficeMin's processing system, where it is processed, flutebank.com charged, and the order shipped. OfficeMin then generates an XML document describing the invoice and sends it to flutebank.com.
In subsequent sections of this chapter we will talk about how these use cases can be implemented.