Chapter 6
267
Developers who use the Web service approach for integration can leverage the
advantages of Web services. Developers can write new enterprise applications
with any technology that supports Web services, and the applications may be run
on a variety of hardware and software platforms. However, this approach falls
short when the new applications have certain additional requirements, such as
transactional semantics or stringent security requirements. We discuss how to
handle these issues in subsequent sections.
The adventure builder application is a good example of the Web services
approach. As noted, the adventure builder enterprise uses Web services for inte
grating its supply chain. (Chapter 8 discuss the exact structure of the application,
but here we highlight those details that pertain to integration.) The adventure
builder architects decide, in consultation with the suppliers, on the schemas for the
documents that they intend to exchange. (See Designing Domain Specific XML
Schemas on page 131.) Since their business depends on this exchange of docu
ments the adventure builder application sends purchase orders to various suppli
ers who fulfill adventure requests, and, in turn, the suppliers invoice adventure
builder the adventure builder enterprise and the suppliers need to agree on
schemas that describe the content of these documents. For example, a lodging
supplier might use an invoice document schema. Code Example 6.1 shows an
example document corresponding to that schema. Similar schemas are defined for
other kinds of suppliers, such as activity and airline suppliers.
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.1
Lodging Supplier Invoice
<
New Page 1
Clan Web Hosting