Messaging and Web Services


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.

click to expand
Figure 11.5: Synchronous Web services

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.

click to expand
Figure 11.6: Asynchronous Web services

In subsequent sections of this chapter we will talk about how these use cases can be implemented.




Java Web Services Architecture
Java Web Services Architecture (The Morgan Kaufmann Series in Data Management Systems)
ISBN: 1558609008
EAN: 2147483647
Year: 2005
Pages: 210

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net