90
Designing a Service's Interaction Layer
E
Before delegating these incoming client requests to the Web service business
logic, you should perform any required security validation, transformation of
parameters, and other required preprocessing of parameters.
As noted in Parameter Types for Web Service Operations on page 72 and
elsewhere, Web service calls are basically method calls whose parameters are
passed as either Java objects, XML documents (
javax.xml.transform.Source
objects), or even SOAP document fragments (
javax.xml.soap.SOAPElement
objects).
E
For parameters that are passed as Java objects (such as
String,
int
, JAX RPC
value types, and so forth), do the application specific parameter validation and
map the incoming objects to domain specific objects in the interaction layer
before delegating the request to the processing layer.
You may have to undertake additional steps to handle XML documents that
are passed as parameters. These steps, which are best performed in the interaction
layer of your service, are as follows:
1. The service endpoint should validate the incoming XML document against its
schema. For details and guidelines on how and when to validate incoming
XML documents, along with recommended validation techniques, refer to
Validating XML Documents on page 139.
2. When the service's processing layer and business logic are designed to deal
with XML documents, you should transform the XML document to an inter
nally supported schema, if the schema for the XML document differs from the
internal schema, before passing the document to the processing layer.
3. When the processing layer deals with objects but the service interface receives
XML documents, then, as part of the interaction layer, map the incoming XML
documents to domain objects before delegating the request to the processing
layer. For details and guidelines on mapping techniques for incoming XML
documents, refer to Mapping Schemas to the Application Data Model on
page 143.
E
It is important that these three steps validation of incoming parameters or
XML documents, translation of XML documents to internal supported sche
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