Chapter 3 Service Endpoint Design
95
vices, the content of the request parameters initiates and determines the process
ing workflow the steps to fulfill the request for the Web service. Often,
fulfilling a request requires multiple workflow steps.
The travel agency service is a good example of an asynchronous interaction
between a client and a service. A client requests arrangements for a particular trip
by sending the travel service all pertinent information (most likely in an XML
document). Based on the document's content, the service performs such steps as
verifying the user's account, checking and getting authorization for the credit
card, checking accommodations and transportation availability, building an itiner
ary, purchasing tickets, and so forth. Since the travel service must perform a series
of often time consuming steps in its normal workflow, the client cannot afford to
pause and wait for these steps to complete.
Figure 3.7 shows one recommended approach for asynchronously delegating
these types of Web service requests to the processing layer. In this architecture,
the client sends a request to the service endpoint. The service endpoint validates
the incoming request in the interaction layer and then delegates the client's request
to the appropriate processing layer of the service. It does so by sending the request
as a JMS message to a JMS queue or topic specifically designated for this type of
request.
E
Delegating a request to the processing layer through JMS
before
validating the
request should be avoided.
Validation ensures that a request is correct. Delegating the request before val
idation may result in passing an invalid request to the processing layer, making
error tracking and error handling overly complex. After the request is successfully
delegated to the processing layer, the service endpoint may return a correlation
identifier to the client. This correlation identifier is for the client's future reference
and may help the client associate a response that corresponds to its previous
request. If the business logic is implemented using enterprise beans, message
driven beans in the EJB tier read the request and initiate processing so that a
response can ultimately be formulated.
footer
Our web partners:
Inexpensive
Web Hosting
Java Web Hosting
personal webspace
webspace php
linux webhost
html web templates
DreamweaverQuality Web Templates
PSD Web Templates
cheap webhost
j2ee web Hosting
buy webspace
ftp webspace
adult webspace
frontpage WebHosting
webspace hosting
cheap webhost
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved
webhosting