280
Data Integration Guidelines
native formats and the translation happens just before the data either goes out
to the external world or comes in from the outside.
2. Use a facade approach and do programmatic object mapping in the DAO layer.
That is, you set up a DAO to connect an EIS to the application server. Write
the DAO so that it exposes only the canonical data model and have it map any
incoming data to the appropriate internal data model. Since this approach con
verts incoming data to the canonical form when the data arrives at the applica
tion server, the business logic internally uses the canonical data representation.
To understand the XSL style sheet approach, let's consider how the adventure
builder enterprise receives invoices from various suppliers. In adventure builder's
case, various suppliers submit invoices, and each supplier may have a different
representation (that is, a different format) of the invoice information. Furthermore,
adventure builder's various EISs may each have a different representation of the
same invoice information. Code Example 6.6 shows an example of a typical sup
plier's invoice.
xmlns:xsi="http://www.w3.org/2001/XMLSchema instance"
xsi:schemaLocation=
"http://java.sun.com/blueprints/ns/invoice
http://java.sun.com/blueprints/schemas/
invoice lodging.xsd">
1234
AB j2ee 1069278832687
LODGING_INVOICE
COMPLETED
LODG 6
1234 Main Street, Sometown 12345, USA
No Cancelations 24 hours prior
Code Example 6.6
Example of Supplier Invoice Information
<
New Page 1
Clan Web Hosting