Chapter 3 Service Endpoint Design
65
Viewing your service implementation in terms of layers helps to:
Clearly divide responsibilities
Provide a common or single location for request processing (both pre and
post processing) logic in the interaction layer
Expose existing business logic as a Web service
To put this notion of a layered view in the proper context, let's look at an
example such as adventure builder's business process Web service scenario. In
this scenario, a partner travel agency uses adventure builder enterprise's Web
service to build a travel itinerary for its clients. Through the service interface it
exposes to these travel agencies, adventure builder enterprise receives business
documents (in XML format) containing all required details for travel itinerary
requests. Adventure builder uses its existing workflow systems to process and
satisfy these partner requests. The interaction layer of adventure builder's exposed
Web service interface validates these incoming business documents, then converts
the incoming XML documents to its internal format or maps document content to
Java objects. Once the conversion is finished, control passes to the workflow
mechanisms in the processing layer where travel requests are completed. The
interaction layer generates responses for completed travel requests, converts
responses to XML documents or other appropriate formats, and ensures that
responses are relayed to the partner agencies.
It is important to clarify the extent of the preprocessing performed at the inter
action layer, since it differs from the JAX RPC runtime processing. Adventure
builder's interaction layer its exposed Web service interface applies service
specific preprocessing to requests coming in to the service. This service specific
preprocessing is performed only if required by the service logic, and it includes
converting incoming XML documents to a suitable form or mapping the docu
ment contents to Java objects. This mapping of incoming XML documents to
business objects is not the same as the JAX RPC runtime mapping between XML
documents and Java objects. Although the container performs the JAX RPC
runtime mapping for all requests and responses, the developer chooses the
mapping of incoming XML documents to business objects.
E
Although there are advantages, as noted previously, to viewing a service in
terms of interaction and processing layers, a Web service may opt to merge
these two layers into a single layer. There are times when multiple layers make
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