Professional Documents
Culture Documents
Luis Ennser
Pietro Leo
Tamas Meszaros
Eric Valade
ibm.com/redbooks
SG24-6104-00
Take Note!
Before using this information and the product it supports, be sure to read the general information in
Appendix C, Special notices on page 297.
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xi
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
The team that wrote this redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Comments welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Part 1. Introduction to e-business and XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 1. XML and e-business applications . . . . . . . . . . . . . . . . . .
1.1 About e-business . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.1 Business transformation and innovation . . . . . . . . . . . . . . . . .
1.1.2 Which is the e-business value? . . . . . . . . . . . . . . . . . . . . . . .
1.1.3 A simplified classification schema for e-business applications
1.2 The Extensible Markup Language (XML) . . . . . . . . . . . . . . . . . . . .
1.2.1 World Wide Web document standards . . . . . . . . . . . . . . . . . .
1.2.2 A brief history of XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.3 XML a universal data format . . . . . . . . . . . . . . . . . . . . . . .
1.2.4 A short comparison of XML and HTML . . . . . . . . . . . . . . . . . .
1.2.5 XML linking and addressing . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.6 Advanced type definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.7 Metadata (RDF and PICS) . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.8 Domain-specific document definitions. . . . . . . . . . . . . . . . . . .
1.2.9 XML in wireless applications. . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.10 XML styling and transcoding . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.11 XML query languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.12 Processing XML documents . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.13 Organizations concerned with XML. . . . . . . . . . . . . . . . . . . .
1.2.14 Typical applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 XML and e-business . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .3
. .3
. .5
. .7
. .8
. 15
. 16
. 16
. 18
. 19
. 20
. 21
. 21
. 22
. 23
. 24
. 25
. 25
. 29
. 30
. 31
. 34
.
.
.
.
.
.
.
. 35
. 35
. 37
. 38
. 42
. 51
. 57
.
.
.
.
.
.
.
..
..
..
..
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
iii
. . 59
. . 59
. . 63
. . 65
. . 68
. . 68
. . 74
. . 77
. . 82
. . 82
. . 84
. . 85
. . 89
. . 89
. . 96
. . 97
. . 97
. 100
. 102
. 104
Part 2. Designing B2C and B2B e-business applications using XML . . . . . . . . . . . . 105
Chapter 4. Patterns for B2C and B2B applications . . . . . . . .
4.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.1 Logical and physical patterns . . . . . . . . . . . . . . . . . . . .
4.1.2 Runtime topology nodes . . . . . . . . . . . . . . . . . . . . . . . .
4.2 e-business patterns for B2C applications . . . . . . . . . . . . . . .
4.2.1 B2C logical patterns for e-business . . . . . . . . . . . . . . .
4.3 e-business patterns for B2B applications . . . . . . . . . . . . . . .
4.3.1 B2B logical patterns for e-business . . . . . . . . . . . . . . .
4.3.2 Physical patterns for B2C and B2B runtime topologies .
4.4 Implementation considerations for XML . . . . . . . . . . . . . . . .
4.4.1 Applications that benefit from using XML . . . . . . . . . . .
4.4.2 Typical design for applications using XML . . . . . . . . . .
4.4.3 A sample of an architecture for XML applications . . . . .
4.4.4 Composing Java object with XML . . . . . . . . . . . . . . . . .
4.4.5 XML filtering with Java servlets . . . . . . . . . . . . . . . . . .
4.4.6 XML/XSL as inputs for a Web application generator . . .
4.4.7 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4.8 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iv
The XML Files: Using XML for B2B and B2C Applications
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 107
. 107
. 107
. 108
. 110
. 111
. 117
. 117
. 127
. 129
. 130
. 131
. 132
. 135
. 135
. 136
. 136
. 137
. 137
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 139
. 139
. 139
. 140
. 143
. 144
. 146
. 148
. 151
. 152
. 156
. 157
. 160
. 162
. 165
. 166
. 168
. 171
. 174
. 175
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 241
. 241
. 242
. 244
. 246
. 247
. 257
. 261
..
..
..
..
..
.
.
.
.
.
.
.
.
.
.
. 264
. 271
. 272
. 274
. 279
.......
.......
.......
.......
......
......
......
......
.
.
.
.
295
295
295
296
.......
.......
.......
.......
......
......
......
......
.......
.......
.......
.......
......
......
......
......
.
.
.
.
301
301
302
302
vi
The XML Files: Using XML for B2B and B2C Applications
Figures
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
vii
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
viii
The XML Files: Using XML for B2B and B2C Applications
84.
85.
86.
87.
88.
89.
ix
The XML Files: Using XML for B2B and B2C Applications
Tables
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
xi
xii
The XML Files: Using XML for B2B and B2C Applications
Preface
When you get right down to it, e-business is a simple concept. An e-business
is an organization that connects critical business systems directly to key
actors such as customers, employees, suppliers, and distributors, by using
Internet technology. But this simple concept quickly becomes powerful. As
customers, employees, suppliers and distributors are all connected to the
business systems and information they need, e-business actually transforms
key business processes. This book intends to present the emergence, and
the impacts of the Extensible Markup Language (XML) in e-business world.
By reading this book, customers, IBM sales people, IT architects, and IT
specialists will have the opportunity to understand how the marriage
between XML technology and the IBM Application Framework for e-business
can help to leverage e-business applications, particularly those based on
business-to-business (B2B), and business-to-consumer (B2C) models.
In writing this book, residents had many discussions with IBM people involved
in e-business, XML, and related technologies. They also surfed the net (IBM
and non-IBM) to gather information about the e-business world in general, the
IBM e-business vision and solution, and the XML technology applied to the
e-business applications.
This book is designed to expand your knowledge on the following topics:
The e-business market: what is going on, trends, and directions.
The added value of XML technology to help to solve issues, and some
challenges that arise through e-business applications such as data
exchange, portal services, and pervasive device support.
How IBM cuts XML and related technologies down to size in its application
Framework for e-business, including details of the IBM offering in terms of
architecture and tools to design, develop, deploy, and run complex B2B
models (applications sharing services among different trading partners),
and B2C models (applications providing end-users with various services).
This book also depicts a case study in the eMarketPlace field that
demonstrates the ability of XML technology combined with the IBM
Application Framework for e-business to implement both B2B and B2C
models.
xiii
xiv
The XML Files: Using XML for B2B and B2C Applications
Comments welcome
Your comments are important to us!
We want our Redbooks to be as helpful as possible. Please send us your
comments about this or other Redbooks in one of the following ways:
Fax the evaluation form found in IBM Redbooks review on page 313 to
the fax number shown on the form.
Use the online evaluation form found at ibm.com/redbooks
Send your comments in an Internet note to redbook@us.ibm.com
xv
xvi
The XML Files: Using XML for B2B and B2C Applications
The XML Files: Using XML for B2B and B2C Applications
The XML Files: Using XML for B2B and B2C Applications
Awareness Presence
Pilot
Adoption
Allow
Allow
access transactions
to key
on key
systems
systems
Process
Investment
CrossProcess
Integration
Improve key
business
process(es)
Redefine
key
process(es)
(read only)
The first two steps are typically a companys introduction to using Web
technologies deploying intranet applications to communicate with
employees and establishing external Web presence with information about
the company and its offerings.
This experience has led companies to take the first steps toward real
e-business the establishment of pilots that give customers and suppliers
access to the information contained in key business systems for example,
opening up the customer database that a service representative views and
providing this information to customers directly.
The next step in the cycle extends legacy transaction capability to customers.
The travel industry, for example, offered online bookings, while retail banking
offered online banking.
The final two steps in the process offer the greatest opportunity for return, as
companies transform their business processes by integrating multiple
back-end systems to create a common user experience. As an example, an
airline has integrated all travel systems and customer processes for
bookings, upgrades, seat and meal selection, awards redemption, and
frequent flyer account management.
The XML Files: Using XML for B2B and B2C Applications
During these last two steps, not only can a customer buy or process
transactions online whenever they wish, but the company gains valuable
insight and knowledge about the specific needs and behaviors of its
customers. They can also segment customers from a behavioral perspective
as well as from a value perspective. However, without an initial effort to make
the data customer-ready, value for both the customer and the enterprise,
though real, would be minimal. Many companies have begun offering online
transactions to reduce their costs without considering the value for their
customers and, therefore, have not achieved sustained customer
commitment to the system.
In the process investment phase, armed with this customer knowledge and
with the integration of business intelligence tools, analyses, and insights,
companies can improve the customer relationship process by personalizing
customer interactions online and integrating the customer view for their entire
enterprise. Through these personalized interactions, customer retention and
loyalty analysis can be applied to serving the customer more effectively at the
point of need, rather than integrating this information after the fact.
Cross-process integration, the final phase in e-business evolution, focuses on
integrating across all the processes in an enterprise as well as across
customer processes. For the enterprise, this means integrating all the
customer touch points across all operational systems from supply to demand
fulfillment, and through customer satisfaction. For the customer, it means
linking the systems of all the suppliers involved in their process. Airlines, for
example, have integrated their booking systems with their frequent traveler
services internally and have linked into their travel partner systems to begin
offering passengers a single convenient point of fulfillment; retail banks are
integrating their services into a much broader single service access point for
their online customers.
The XML Files: Using XML for B2B and B2C Applications
Note
Company
e-business applications
intra
Trading Partners
inter
Redesigned
applications
Business To
Business
Business To
Employee
Business To
Consumer
Legacy
Customers
Figure 2. The e-business applications classification schema
10
The XML Files: Using XML for B2B and B2C Applications
11
Electronic Catalogs
Web stores
Web selling
Web auctions
Software
Other
Groceries
Books
Computers/CE
Travel
1998
1999
2000
Billions
$300
High Estimate
$180
2001
2002
2003
12
The XML Files: Using XML for B2B and B2C Applications
13
Payment management
Link the company, supplier, and distributors so that payments can be sent
and received electronically, thus, eliminating thousands of labor hours per
week.
Financial management
Enable global companies to manage their money in various foreign
exchange accounts.
Sales force productivity
Improve the communication and flow of information among sales,
customer, and production functions, thus, creating greater access to
market intelligence and competitor information.
Figure 4 shows how fast the business-to-business sector is growing.
$3.2
Trillions
Other
Utilities
Petrochemicals
Motor Vehicles
Computing/Electronics
High Estimate
$1.8
1998
1999
2000
2001
2002
2003
14
The XML Files: Using XML for B2B and B2C Applications
During recent months, the traditional B2B model, centered around the
buyer-seller transaction paradigm, is showing its limitations: it is definite in
scale and displays only partial efficiency in terms of market economics. To
overcome these limitations, a new internet business model appeared which
supports B2M2B and leverages existing B2B applications and technology.
The M represents the eMarketPlace or online trading communities which
assist multiple buyers and suppliers in exchanging information and
transactions.
Trading communities are internet based hubs that focus on specific industry
verticals (see, for example, the recent hub, Component Knowledge, launched
by IBM Global Services for the electronic components market) or specific
industry processes that use various market making mechanisms (auctions,
exchanges, aggregation) to mediate any-to-any transactions among
businesses.
Through the trading communities (hubs), buyers and sellers can trade
electronically with established partners and, at the same time, get access to
new markets and new parts of the supply chain. These eMarketPlaces can be
public, where all members participate in an open, interactive buying and
selling community; or private, which are invitation-only communities whose
members participate in special pricing arrangements and/or product and
service offerings. Online trading communities have the potential to create
excellent and efficient markets.
A much more detailed description of the B2B online trading communities and
their related issues is provided in Chapter 7, B2B eMarketPlaces: a case
study on page 241, which proposes a case study in this interesting field.
15
16
The XML Files: Using XML for B2B and B2C Applications
SGML is the document standard for big industries like airplane construction,
automobile, and military. Its strengths are being an implementationindependent, generalized, structured, and extensible language. These
features made it popular for companies that create, handle, and distribute
large amounts of text data.
In 1989, researchers at the CERN European Nuclear Research Facility
developed a hypertext version of the SGML standard, called Hypertext
Markup Language (HTML) to solve information sharing tasks within the
organization. HTML inherited important features from SGML (such as being
structured, implementation-independent, and descriptive), but it was also
limited in many areas (it used a fixed set of element types, and it
concentrated on the presentation). These limitations were necessary to make
the language more simple for easy software implementation and editing.
However, the growing amount of data stored in Web systems put these
limitations into focus. The World Wide Web Consortium (W3C, the
organization behind the Web standards) introduced several extensions to the
HTML standard to solve its interoperability and scalability problems, but
finally it decided to develop a new subset of the SGML standard, XML, for
Web use.
The Extensible Markup Language (XML) was developed to overcome the
limitations of the HTML standard. It retains most of the features of the SGML
standard, but makes it easier to implement and use in the World Wide Web
environment. It became W3C standard in 1998.
The initial draft of this new standard included ten key design goals, which are
worth listing here:
17
18
The XML Files: Using XML for B2B and B2C Applications
19
SMIL
tpaML
SVG
XHTML
PICS
...
P3P
...
RDF
XML
The following sections introduce several new proposals in different areas like
styling, enhanced type definitions, and accessing XML documents from
computer programs.
20
The XML Files: Using XML for B2B and B2C Applications
21
22
The XML Files: Using XML for B2B and B2C Applications
23
24
The XML Files: Using XML for B2B and B2C Applications
its clients. This can also be tailored according to the clients needs, for
example, a WAP client from a wireless phone would prefer different document
formats, than another from a home PC. The IBM WebSphere product family
offers such document transformation using WebSphere Transcoding.
25
Anyone has the freedom to implement a parser that can read and print an
XML document. The XML 1.0 Recommendation defines how an XML
processor should behave when reading and printing a document. There are
several parser implementations, for example the IBM XML Parser for Java
(now donated to the Apache Group, and continued under the name Xerces).
The parser can be used as part of an application, which wants to extract data
from or put its own data into XML format. To provide this functionality parsers
specify an application programming interface (API). The XML
Recommendation does not specify this API, therefore it is up to the parsers
designer to specify and implement this interface.
Currently, the following two APIs are widely used:
Simple API for XML
Document Object Model
Simple API for XML (SAX) was developed by David Megginson and a number
of people on the xml-dev mailing list on the Web, because a need was
recognized for simple, common way of processing XML documents. As such,
SAX 1.0 is not a W3C recommendation, but it is the de-facto standard for
interfacing with an XML parser, with many commonly available Java parsers
supporting it.
SAX is an event-driven lightweight API for accessing XML documents and
extracting information from them. It cannot be used to manipulate the internal
structures of XML documents. As the document is parsed, the application
using SAX receives information about the various parsing events. The logical
structure of an application using SAX API with the parser is shown in
Figure 6.
26
The XML Files: Using XML for B2B and B2C Applications
X M L A P P L IC A T IO N
SAX API
XM L PARSER
XM L DO CUM ENT
27
N ode
A ttr
N o d e L is t
C h a ra c te rD a ta
Com m ent
N am edN odeM ap
D o c u m e n tT y p e
Te x t
D O M Im p le m e n ta tio n
C D A T A S e c tio n
D o c u m e n tF ra g m e n t
Docu m ent
D O M E xc e p tio n
(c la s s )
E le m e n t
E n tity
E n tity R e fe re n c e
N o ta tio n
P ro c e s s in g In s tru c tio n
Some important facilities that are missing from the DOM Level1
Recommendation are being defined in DOM Level 2, which is currently a
W3C Candidate Recommendation (10 December, 1999). The added
functionality in Level 2 contains interfaces for creating a document, importing
a node from one document to another, supporting XML Namespaces,
associating stylesheets with a document, the Cascading Style Sheets object
model, the Range object model, filters and iterators, and the Events object
model.
There are certainly applications that could use either SAX or DOM to get the
necessary functionality needed when processing XML documents. However,
these two approaches to XML processing each have their strengths and
weaknesses.
SAX provides a standardized and commonly used interface to XML parsers. It
is ideal for processing large documents whose content and structure does not
need to be changed. Because the parser only tells about the events that the
application is interested in, the application is typically small, and has a small
memory footprint. This also means that SAX is fast and efficient, and a good
choice for application areas such as filtering and searching, where only
certain elements are extracted from a possibly very large document.
28
The XML Files: Using XML for B2B and B2C Applications
Because the events must be handled as they occur, it is impossible for a SAX
application, for example, to traverse backwards in the document that is under
processing. It is also beyond SAXs capabilities to create or modify the
contents and internal structure of an XML document.
Because every element of an XML document is represented as a DOM object
to the application using the DOM API, it is possible to make modifications to
the original XML document. Deleting a DOM node means deleting the
corresponding XML element and so on. This makes DOM a good choice for
XML applications that want to manipulate XML documents, or to create new
ones.
DOM is not originally an event driven API like SAX, even though the DOM
Level 2 draft specifies events. To extract even a small piece of data from an
XML document, the whole DOM tree has to be created. There is no way of
creating lightweight applications using DOM. If the original XML document is
large, the DOM application that manipulates the document requires a lot of
memory. In practice, DOM is mostly used only when creating or manipulating
XML documents is a requirement.
There are other initiatives to specify application interfaces to XML documents
in various environments. There are native APIs for different programming
platforms, like Pyxie for Python (http://www.pyxie.org), or the Java API for
XML Parsing (JAXP, java.sun.com/xml), and XML components for various
applications like DB2 XML Extender.
For more information about XML support in IBM products see Chapter 3,
XML in the IBM Application Framework for e-business on page 59. For a
more detailed description about DOM and SAX, and application examples,
read The XML Files: Using XML and XSL with WebSphere 3.0 by Luis
Ennser, Christophe Chuvan, Paul Fremantle, Ramani Routray and Jouko
Ruuskanen (IBM Redbook SG24-5479-00).
29
they call their standards) on XML, XSL, XPath, Namespaces, MathML, and
other related technologies. It also issues Proposed Recommendations
(Recommendations before the W3C Advisory Committee reviews them),
Candidate Recommendations (published for external review), and Working
Drafts (submitted for review by W3C members).
The largest industrial consortium to promote the structured document
management technology (SGML and XML) is the Organization for the
Advancement of Structured Information Standards (OASIS,
http://www.oasis-open.org). It is a non-profit, international consortium of users
and suppliers (including IBM) whose products and services support SGML
and XML. OASIS operates XML.ORG, the a global XML industry Web site
featuring an XML registry and repository that offers automated public access
to XML schemas for electronic commerce, business-to-business transactions,
and tools and application interoperability. The annual SGML/XML 'XX
Conference and the corresponding SGML/XML Europe Conference are
co-sponsored by OASIS (together with the Graphic Communications
Association), as are other major SGML/XML events.
CommerceNet ( http://www.commercenet.com) is a non-profit global
membership organization whose mission is to promote and advance
interoperable electronic commerce to support emerging communities of
commerce. It runs several research projects about XML topics.
BizTalk ( http://www.biztalk.org) is a Microsoft initiative whose goal is driving
the rapid, consistent adoption of XML to enable electronic commerce and
application integration. It defines the BizTalk Framework, a set of
guidelines for how to publish schemas in XML and how to use XML messages
to easily integrate software programs. It runs independently from other
industrial organizations like OASIS and CommerceNet.
30
The XML Files: Using XML for B2B and B2C Applications
majority of the Global 2000 companies have between 10,000 and 40,000
trading suppliers, 80% of those have not implemented EDI trading. By using
XMLSolutions XEDI Translator this majority of the trading partners can also
participate in electronic transactions. IBM WebSphere, WebSphere Studio,
and VisualAge for Java are used to implement XMLSolutions products.
31
32
The XML Files: Using XML for B2B and B2C Applications
XML Feature
33
1.4 Summary
In this chapter we summarized the two key areas this book focuses on:
e-business applications and the XML technology.
E-business systems are defined as applications that use Internet technology
to improve business processes. We categorized e-business applications as
being intra-business or inter-business systems, and we gave detailed
descriptions of these categories. As a key example in intra-business
applications, business-to-employee (B2B) systems, which facilitate
information sharing within the company, were briefly introduced. The two
main areas of inter-business cooperation are business-to-business (B2B) and
business-to-consumer (B2C).
B2B applications help companies in establishing electronic transactions and
partnership over the Internet. They enhance business process automation,
collaboration with other companies, and establish virtual markets and
communities. B2C applications help companies to automate and enhance
their customer relations. Using B2C solutions, companies can create and
maintain information sites, automated customer service, help desks,
electronic catalogs, and Web stores. These solutions help in marketing, sales
and support.
The Extensible Markup Language is a key technology to build e-business
applications, since it is a platform and vendor independent document
standard for describing structured data. As a universal data format, it enables
the seamless connection to business partner systems. It is based on an ISO
industry standard (SGML), and it is created for Web use. In the second
section of this chapter we introduced this technology, showing its key features
and areas. We have also shown application examples, where XML was used
to enhance business applications.
Finally, in the last part of the chapter, we summarized the impact of XML on
e-business. We gave a list of advantages that XML provides in e-business,
and we analyzed the relationships between the main XML features and the
e-business applications.
34
The XML Files: Using XML for B2B and B2C Applications
35
Leverage
Transform
knowledge and
information
Run
a scalable,
available, safe
environment
core business
process
Build
new
applications
36
The XML Files: Using XML for B2B and B2C Applications
37
The Framework is based on what has been proven successfully over the last
three years as IBM has worked closely with customers to help them develop
and deploy the e-business applications that are transforming their
businesses. In this section, we will not be covering the IBM Application
Framework for e-business in detail. Rather, we will introduce the general
concepts and objectives of the Framework.
38
The XML Files: Using XML for B2B and B2C Applications
to new database designs. These figures are not unique to the utilities
industry. The same trends are apparent in the insurance industry. Specifically,
the replacement of existing contract management systems in a large
insurance company in France was recently reported to have consumed five
hundred person-years over an elapsed time of six years or more.
It goes without saying that any project of five hundred person years is
exposed to considerable risk not only the risk of technical failure, but also
the risk that, upon final delivery, the business requirements will have changed
beyond recognition, and the delivered solution may no longer meet business
needs. These are known as instant legacy solutions.
Older or legacy systems frequently seem, to the end user, to be
disconnected, with independently-operating silos. For example, in an
insurance company, one IT system may deal with life insurance business and
another with general business, such as car insurance. More likely, the life
insurance business itself will run multiple systems to handle various products,
such as unit business, group products, and so on.
With today's focus on customer service, it is increasingly unacceptable for an
enterprise to communicate with its customers separately from each system.
To put it in a more positive way, a more coherent view of a customer that
considers all products held by that customer provides excellent marketing
opportunities and improved customer retention; so, the existence of silos,
typically manifested both through incompatible hardware and incompatible or
segregated software, is a serious issue.
Many development efforts start from scratch, and architectural components
are integrated to create a custom architecture without the use of a template
or blueprint. Frequently, the project creates extensive custom middle ware,
which might not have been needed if a blueprint-driven approach had been
taken. The selection of products from vendors is left to the skill of one or a
few key architects. As a consequence, the solution takes longer to develop
and deliver, and the costs and risks are higher. Along the way, opportunities
to leverage existing products, services, the prior integration of components,
and the opportunity to acquire knowledge for subsequent reuse have been
lost.
When combining this risk with the likely development costs of fifty million
dollars or more, it is apparent that our industry is facing a crisis. In these
circumstances, it is not surprising that enterprises are seeking to mitigate risk
by taking an asset-based approach.
39
40
The XML Files: Using XML for B2B and B2C Applications
Helps you work with multi-platform standards like Java and technologies
like CORBA and XML.
Explains the characteristics of application servers and how to connect with
clients of all types.
Guides you to more information on network, data, and infrastructure
standards.
IBM Application Framework helps you build and deploy, so you can write an
application on one platform and run it somewhere else without completely
rewriting the code. The Framework offers the fastest way to develop
e-business applications and integrated software, server, and services, when
you are faced with the unique development and deployment challenges
involved in building e-business applications that are scalable, work across
multiple platforms, and integrate with existing applications.
The benefits of developing applications using the IBM Application Framework
are illustrated by the key principles that have guided its development:
Maximize ease and speed of development and deployment. By adopting a
server-centric, Java based component model and toolset, your e-business
applications can be developed and deployed quickly with skills ranging
from non-technical graphic designers to programmers.
Accommodate any client device. Support of Internet standards and a
server centric model expands access to your e-business applications to a
broad range of client devices.
Ensure portability across a diverse server environment. Support of the
open, unifying Java platform makes it easy to deploy your e-business
applications on the systems that best meet your scalability and quality of
service requirements.
Leverage and extend existing assets. To improve time to market and
reduce cost of development, e-business applications must leverage and
extend the reach of secure, reliable, and scalable applications that are the
core of many business processes.
Flexible and extendable. Able to accommodate future technology, such as
pervasive computing, Internet2.
The IBM Application Framework for e-business programming model is used
as a basis for the design of e-business applications. This model has evolved
from the traditional client/server computing model. The key properties of
applications based on this model are as follows:
41
42
The XML Files: Using XML for B2B and B2C Applications
across a network. In its most basic form, as shown in Figure 9, the Framework
can be depicted as a logical three-tier computing model, meaning that there is a
logical, but not necessarily physical, separation of processes. This model is
designed to support clients with high-function Web application and enterprise
servers.
E xtern a l
S ervice s
N e tw o rk in fra s truc tu re th a t u se s
ind u s try sta n da rd A P Is a nd
p ro toco ls
C o nn e cto rs
Web
A p p lica tio n
S e rvers
Thin client
C o n te n t E nterprise
JavaB eans
43
e - b u s in e s s A p p l ic a t io n
S e r v ic e s
W e b A p p lic a t io n P r o g r a m m in g
E n v iro n m e n t
A p p lic a t io n
S e rv e r
S o ft w a r e
E x te r n a l
S e r v ic e s
A p p lic a t io n
I n t e g r a t io n
N e tw o r k I n f r a s t r u c t u r e
S y s te m M a n a g e m e n t
T o o ls
W eb
A p p li c a t io n
S e rv e rs
c l ie n ts
Java
C o n te n t
E n t e r p r is e
JavaB eans
44
The XML Files: Using XML for B2B and B2C Applications
45
46
The XML Files: Using XML for B2B and B2C Applications
47
Service
Protocol standard
API
Directory
LDAP
JNDI
Security
JSSL, JCE
Network
TCP/IP
JDK java.net
File
AFS/DFS
JDK java.io
IPP, LPR/LPD
Pervasive computing
MNCRP, WAP,
Transcoding
non applicable
48
Service
Protocol standard
API
Groupware
non applicable
Data
ODBC, DRDA
JDBC, SQL-J,EJB
Transaction
CORBA, OTS/IIOP
EJB, JTS
Message queuing
not applicable
JMS
Message routing,
transformation
The XML Files: Using XML for B2B and B2C Applications
Service
Protocol standard
API
Workflow
non applicable
Service
Protocol standard
API
Web server
HTTP, HTML
Servlets,
Server-side-includes
Web browser
HTTP, HTML
Applets
Component model
CORBA IIOP
Java beans
Business component
model
CORBA IIOP
JB, RMI
Scripting
ECMAScript
JSP
Service
Protocol standard
API
Distribution (Install/Config)
DMTF-CIM
AMS
Operations (Fix/Change)
DMTF-CIM
AMS
Performance (Monitor)
SNMP
ARM
Events (Alarms)
SNMP
TEC
Service
Protocol standard
API
WebDAV
non applicable
Service
Protocol standard
API
Commerce
EDI, OBI,SET
non applicable
49
Firewall
c lie n ts
W e b A p p lic a tio n
S e rv e rs
c lie n ts
E x te rn a l S e rv ic e s
- in te r e n tre p ris e s
- b u s in e s s p a rt n e rs
50
The XML Files: Using XML for B2B and B2C Applications
back to the client. The Web application server provides a wide range of
programming, data access, and application integration services for writing
the business logic part of a Web application.
External services
These consist of existing mission-critical applications and data within the
enterprise as well as external partner services, such as payment services,
financial services, and external information services. Most often, these
existing applications and services control the company's core business
processes.
Most often, these existing applications and services control the company's
core business processes.
51
Customer expectation:
- Business problem
- Business procedures/rules
- Existing environment
tion
om
iza
Logical patterns:
- Application topologies
- Runtime topologies
Cu
st
ogy
dol
tho
Me
Business patterns:
- based on scenarii
Physical pattern:
- runtime product map
BUILD
Development tools
and Components
RUN
Server and
integration software
MANAGE
e-business
Application Framework
for e-business
52
The XML Files: Using XML for B2B and B2C Applications
Business patterns
User-to-business
e-commerce
User-to-online buying
Business-to-business
Collaboration
User-to-user
User-to-data
Application integration
53
problem. Your choice of application topology will typically take you to the
underpinning runtime topology. The runtime topologies are based on the
Enterprise Solution Structure (ESS) patterns. Some recent ESS work
involved looking at patterns for complete end-to-end System Architectures
(refer to the IBM Systems Journal, Volume 38, No. 1, 1999. Enterprise
Solutions Structure at http://www.research.ibm.com/journal/sj38-1.html).
ESS is now part of SIMeth (or IBM Global Services Method), the work
product based methodology used by IBM Global Services.
The physical patterns provide runtime product mappings together with
guidelines for design, development and management of the application.
The rest of this section focuses on the business patterns. The logical and
physical patterns will be covered in more detail in Chapter 4, Patterns for
B2C and B2B applications on page 107.
2.2.3.1 User-to-business pattern
The user-to-business pattern refers to the general case of users (internal to
the enterprise or external) interacting with enterprise transactions and data.
In particular, it is relevant to those enterprises that deal with goods and
services not normally listed in and sold from a catalog. Basically, it covers all
user-to-business interactions that are not in the user-to-online buying pattern.
This business pattern also covers the more complex case in which there is a
need to access back-end applications and data such as Customer
Relationship Management.
Here are some examples of the user-to-business pattern:
Convenience banking
-
Discount brokerage
-
54
Portfolio summary
Detailed holdings
Transaction history
Quotes and news
Buy and sell stocks
The XML Files: Using XML for B2B and B2C Applications
55
56
The XML Files: Using XML for B2B and B2C Applications
2.3 Summary
This chapter has provided a general overview of the IBM solution for
e-business. This solution is built on a model that helps customers to
transform and innovate their businesses to e-businesses using the IBM
Application Framework, a model that helps customers to design, develop,
and deploy their e-business applications.
The next chapter describes the place of XML in the overall picture of the IBM
e-business world.
57
58
The XML Files: Using XML for B2B and B2C Applications
59
BUILD
RUN
Development tools
and Components
Server and
integration software
MANAGE
Application Framework
for e-business
e-business
XML
Figure 13. Leveraging the IBM Application Framework for e-business with XML
60
The XML Files: Using XML for B2B and B2C Applications
Clients
Servlets
EJBs
JSPs
Back-end
XSL/XSLT
XML:
- data
- meta data
- messages
AppletsBeans
ActiveX components
XML/XSL
HTML/CSS
XML/XSL
Browsers
and
Pervasive computing
XML data
XML meta data
DTD/Schema
Data modeling
Meta content
Rich document
Messaging
Database
Storage
Table 9 through Table 13 are intended to place XML in the standard protocols
and APIs supported by each component of the Application Framework for
e-business, as defined in API and protocols support on page 48.
Table 9. Standard protocols and APIs: Network infrastructure
Service
Protocol standard
API
XML-DSig
WAP/WML, VoiceXML
Not applicable
Directory
Security
Network
File
Print
Pervasive computing
61
Service
Protocol standard
API
DOM, JAXP
XML, XEDI
MQSeries integrator
Service
Protocol standard
API
Web server
Servlets,
Server-side-includes
JSP (XML data island)
SAX, Xalan
Web browser
XML,XHTML, XSL/XSLT,
DOM level 1
Applets, directDOM,
Xerces, Xalan
Component model
XML
Business component
model
XML
EJB
Scripting
Table 12. Standard protocols and APIs: Development tools
Service
Protocol standard
API
XML, XMI
Not applicable
Service
Protocol standard
API
Commerce
XML, TPA/BPF,
RosanettaNet, ebXML
Not applicable
The next section provides additional information about IBMs strategy to put
XML in its Application Framework for e-business.
62
The XML Files: Using XML for B2B and B2C Applications
do m D irect
X a lan
Clie nts
X M L en ab ler
Lo tusX S L /X a la n
FO P
X erces/S A X
X M L Is lan d
S VG
W e bS ph ere Tran sco din g P ub lish er
Se rvlets
EJB s
JSP s
A pp letsB ea ns
A ctive X com pone nts
M Q S eries
In te gra tor
D B 2 X M L E xte nd er
B a ck -end
X S L/X S LT
X M L:
- d ata
- m e ta d ata
- m e s sa ge s
X M L/XS L
H TM L/C S S
X M L /XS L
B row sers
and
P ervasive com pu ting
R ic h d o c u m en t
X M L da ta
X M L m eta d ata
D TD /Sch em a
D a ta m o d elin g
M e ta co n te n t
M e ss ag in g
D a tab a se
Sto ra g e
All the components to be described in this section are available from the IBM
AlphaWorks site http://www.alphaworks.ibm.com or xml.apache.org. This list is
not exhaustive; there are other components on those sites, but we only
describe those which we thought were the most relevant.
63
Note
Table 14 lists the components by category, and gives the URLs from which
you can get further information and download the desired components.
Table 14. List of tools and utilities by category
Components
Category
Relative URL
http://xml.apache.org
Cocoon
Web publishing
/cocoon/index.html
FOP
Formatting
/fop/inedx.html
Xalan
Formatting
/xalan/overview.html
Xerces-C
Parsing
/xerces-c/index.html
Xerces-J
Parsing
/xerces-j/index.html
Xerces-P
Parsing
/xerces-p/index.html
http://www.alphaworks.ibm.com
64
XML4J
Parsing
/tech/xml4j
XML4C
Parsing
/tech/xml4c
Data Description by
Example
Editing
/tech/DDbE
TaskGuide Viewer
Editing
/tech/taskguideviewer
Editing
/tech/visualxmltools
Xeena
Editing
/tech/xeena
X-It
Editing
/tech/xit
Editing
/tech/xdiffmerge
The XML Files: Using XML for B2B and B2C Applications
Components
Category
Relative URL
XML Master
Editing/
programming
/tech/xmas
XSL Editor
Editing/testing
/tech/xsleditor
XSL Trace
Editing/testing
/tech/xsltrace
directDOM
Formatting
/tech/directdom
lotusXSL
Formatting
/tech/lotusxsl
SVGView
Formatting
/tech/svgview
XML Enabler
Formatting
/tech/xmlenabler
Programming
/tech/bml
TSpaces
Programming
/tech/tspaces
VoiceXML
Programming
/tech/voicexml
Programming
/tech/xmitoolkit
XML Generator
Programming/
testing
/tech/xmlgenerator
Programming
/tech/xle
Programming
/tech/xmlsecuritysuite
65
to ensure that the Apache projects continue to exist beyond the participation
of individual volunteers, to enable contributions of intellectual property and
funds on a sound basis, and to provide a vehicle for limiting legal exposure
while participating in open-source software projects.
The xml.apache.org project began with a sizeable collection of open source
software to offer, donated by Sun and various other companies and individual
developers besides IBM. In fact, IBM is an Apache devotee, and has a
proprietary version of Apache, a secure server called the IBM HTTP Server
powered by Apache. IBM provided the initial code base for Xerces (Java,
C++, and Perl versions), as well as ongoing support for this and other Apache
projects such as the Apache HTTP server. Lotus provided the initial code
base for Xalan (Java and C++ versions).
The xml.apache.org project currently consists of four sub-projects, each
focused on a different aspect of XML:
Cocoon: A powerful framework, for XML Web publishing
FOP: The world's first print formatting utility driven by XSL formatting
objects
Xalan: XSL stylesheet processors
Xerces: World-class XML parsers
Each of these sub-projects is described in more detail in the following
sections.
3.2.1.1 Cocoon XML-based Web publishing
Cocoon is a powerful framework for XML Web publishing, written in Java,
which brings a whole new world of abstraction and ease to consolidated Web
site creation and management based on the XML paradigm and related
technologies.
The Cocoon model supports the creation of Web sites that are highly
structured and well-designed, reducing duplication of efforts and site
management costs by allowing different presentations of the same data,
depending on the requesting client (HTML clients, PDF clients, WML clients),
and separating different requirements, skills, and capacities within different
contexts. Cocoon facilitates better human resource management by giving
each individual a unique job, and reducing to a minimum the cross-talk
between different working contexts.
To do this, the Cocoon model divides the development of Web content into
three separate levels:
66
The XML Files: Using XML for B2B and B2C Applications
XML creation: The XML file is created by content owners with no specific
knowledge of how the XML content is further processed, other than the
particular DTD/namespace chosen. This level is always performed by
humans directly through normal text editors or XML-aware tools/editors.
XML processing: The requested XML file is processed and the logic
contained in its logic sheet is applied. Unlike other dynamic content
generators, the logic is separated from the content file.
XSL rendering: The created document is then rendered by applying an
XSL stylesheet to it and formatting it to the specified resource type (HTML,
PDF, XML, WML, XHTML).
3.2.1.2 FOP XSL formatting objects
FOP, the world's first print formatting utility driven by XSL formatting objects,
is a Java 1.1 application that reads a formatting object tree and then turns it
into a PDF document. The formatting object tree can be in the form of an XML
document (output by an XSLT engine like Xalan), or it can be passed in
memory as a DOM Document or (in the case of Xalan) as SAX events.
3.2.1.3 Xalan XSL stylesheet processors
Xalan (named after a rare musical instrument) is available for both Java and
C++, fully implementing the W3C Recommendation 16 November 1999 XSL
Transformations (XSLT) Version 1.0 and the XML Path Language (XPath)
Version 1.0. XSLT is the first part of the XSL stylesheet language for XML. It
includes the XSL Transformation vocabulary and XPath, a language for
addressing parts of XML documents.
3.2.1.4 Xerces XML parsers
Xerces (named after the Xerces Blue butterfly) provides world-class XML
parsing and generation. Fully-validating parsers are available for both Java
(Xerces-J) and C++ (Xerces-C), implementing the W3C XML and DOM (Level
1 and 2) standards, as well as the de facto SAX (version 2) standard. The
parsers are highly modular and configurable. Initial support for XML Schema
(draft W3C standard) is also provided.
A Perl wrapper is provided for the C++ version of Xerces, which allows
access to a fully validating DOM XML parser from Perl. It also provides for full
access to Unicode strings, since Unicode is a key part of the XML standard.
Xerces-J is available on all Java platforms. Xerces-C is available on AIX,
Linux, HP-UX, Solaris, and Windows.
67
3.2.2 Parsers
IBM is a pioneer in XML technologies, with parsers that have been
consistently highly rated since XML4J version 1.0 was released in 1998. IBM
is a major contributor to Apache's Xerces-J code base, which is the basis for
XML4J version 3.
3.2.2.1 XML parser for Java
XML Parser for Java Early Access release (XML4J-EA) is based on the
Apache Xerces XML Parser which is a validating XML parser written in 100%
pure Java.
XML4J consists of a single package ( com.ibm.xml.parser) containing classes
and methods for parsing, generating, manipulating, and validating XML
documents. XML Parser for Java is believed to be the most robust XML
processor currently available and conforms most closely to the XML 1.0
Recommendation.
XML4J includes support for DOM Level 2, SAX2 (alpha), and parts of W3C
Schema.
XML4J is available on all Java platforms.
3.2.2.2 XML parser for C++
XML parser for C++ (XML4C) is based on Apache's Xerces-C XML parser,
which is a validating XML parser written in a portable subset of C++.
XML4C integrates the Xerces-C parser with IBM's International Components
for Unicoded (ICU) and extends the number of encodings supported to over
150.
It consists of three shared libraries (2 code and 1 data) which provide classes
for parsing, generating, manipulating, and validating XML documents.
XML4C is faithful to the XML 1.0 Recommendation and associated standards
(DOM 1.0, SAX 1.0, DOM 2.0). Source code, samples and API
documentation are provided with the parser.
XML4C is available on AIX, Linux, Solaris, Windows NT, Windows 98, HP-UX
11, HP-UX 10.2, AS/400.
3.2.3 Editing
An XML document must be well-formed (tag balancing) and valid (respect
DTD grammar). When creating a DTD file, or an XML document, it is quite
68
The XML Files: Using XML for B2B and B2C Applications
easy to make mistake on the tag name, or on the structure of the document.
IBM proposes some editing tools to facilitate the tedious creation of XML
documents, and DTDs.
3.2.3.1 Data Descriptions by Example
Data Descriptions by Example (DDbE) is a Java component library for
inferring an XML DTD or Schema from a set of well-formed XML instances.
DDbE offers parameters which permit the user to control the structure of the
content models and the types used for attribute declarations. The goal of
DDbE is to give users a good start at creating DTDs for their own
applications.
DDbE is available on all Java platforms.
3.2.3.2 TaskGuide Viewer
TaskGuide Viewer is an XML-based tool for creating wizards. This
wizard-creation tool makes computer tasks easier by breaking complicated
tasks into sequential, simple steps that can be performed using a graphical,
user-friendly interface.
TaskGuide Viewer is a step above other wizard systems, which require you
build the graphical user interface and manage data using traditional
programming languages. Building and displaying wizards with the TaskGuide
Viewer is as easy as creating and viewing HTML files.
The companion documentation, IBM's TaskGuide: An XML-Based System for
Building Wizards, has all the information you need to develop wizards. Once
you've coded your wizard script, the TaskGuide Viewer displays your panels
and follows the instructions in your script. Best of all, the TaskGuide Viewer
provides usability-tested screen layout and navigation options, allowing you
to focus on task content rather than design elements. The main headaches of
building wizards like screen layout, navigation, and data management are
eliminated.
TaskGuide is available on Java platforms.
3.2.3.3 Visual XML tools
The IBM XML Tools package is an early technology release for providing XML
tooling in the Application Framework for e-business. It is not intended for
production use. The IBM XML Tools can be enhanced via a series of ongoing
updates.
This package contains the following four Visual technologies:
69
70
The XML Files: Using XML for B2B and B2C Applications
4. Visual DTD
Visual DTD is a tool for creating and viewing DTDs. Using Visual DTD, you
can do the following:
- Create DTD elements, attributes, entities, and notations.
- Import existing DTDs for structured viewing.
- Create DTDs from existing XML documents.
- Generate DTDs.
- Generate XML Schemas. Note that this is only preliminary support for
the W3C XML Schema Language. IBM intends to provide complete
support in subsequent updates.
- Generate Java classes for creating XML instances of an XML Schema.
- Generate a sample XML document from a DTD.
- Store a model using XMI.
- Generate a default HTML form from a DTD.
- Search elements and attributes in the DTD.
5. Visual XML Transformation
Visual XML Transformation is a tool that can help you create a new XML
document from existing XML documents. Transforming XML to XML can
be very useful if you want to take an existing XML format and transform it
into a format that fits a particular need. Using Visual XML Transformation,
you can do the following:
- Input one or more DTDs describing the source XML documents, and
visually construct the DTD describing the target XML document.
- Generate the resulting DTD.
- Generate the XSLT script that will transform the source XML
documents into the target XML document.
- Unit test the XSLT script.
- Store a model using XMI.
Visual XML tools are available on Windows NT, and all Java platforms.
3.2.3.4 Xeena
When using Xeena, the editor takes as input a given Document Type
Definition (DTD), and automatically builds a palette containing the elements
defined in the DTD. Users can thus create/edit/expand any document derived
from that DTD, by using a visual tree-directed paradigm. The visual paradigm
71
72
The XML Files: Using XML for B2B and B2C Applications
73
3.2.4 Formatting
In this section we describe some rendering technologies for displaying data
contained in XML documents through a Web browser.
3.2.4.1 DirectDOM Development Kit
The DirectDom technology allows a Java developer to manipulate the live
Document Object Model (W3C DOM) of a browser or Scalable Vector
Graphics plug-in to build rich graphical user interfaces.
In its simplest form, DirectDom is about writing Weblets. These are Java
client programs which use the client user interface facilities of a 5th
generation browser or other DOM viewer (such as SVG) to render and control
its interface via standard W3C interfaces found in DOM Level 1, DOM Level
2, and HTML 4.0. These DOM interface facilities include UI widgets, layout,
accessibility, sound, and printing functions. Therefore, the Weblet runtime
74
The XML Files: Using XML for B2B and B2C Applications
does not rely upon the Abstract Windowing Toolkit (AWT) nor the JFC. The
DirectDom runtime is used to build Java programs which run inside a browser
Web page, or as stand alone applications.
The Weblet environment shall be dynamically reconfigurable and extensible
by means of a framework. This shall apply both to the Java component as
well as any possible native component of the Weblet runtime. Given the
reliance of the Weblet runtime upon the underlying facilities of rapidly
changing browser technology, a Weblet environment provider must be able to
update the environment as quickly and as painlessly as possible for the user.
One way to write a Weblet in DirectDom is to write the user interface in HTML
and the logic in Java. In this case, one would embed a Weblet in an HTML
page to perform a role, much as Java Script is used today. The role of the
Weblet would be to set up event listeners to modifications of the HTML. When
such events occur, the Weblet could modify the HTML page accordingly.
A second way to write a Weblet is to embed it in an empty HTML page. When
the Weblet is started, it could dynamically add buttons, tables, text, and
graphics to the browser window via manipulating the DOM. As with the first
scenario, it could then add event listeners and respond to events accordingly.
A third way to write a Weblet is to combine the first two approaches, where at
times pre-constructed HTML is used for the user interface, while at other
times the Weblet adds new UI elements via manipulating the DOM.
In addition, one could simply write a Weblet that is run as an application.
Instead of navigating to a Web page that embeds the Weblet, a user could
simply run a Weblet directly by typing a command in a shell such as DOS or
CSHELL or by double-clicking on a Weblet icon. In this case, the Weblet
could then open a Weblet window to display a UI. A Weblet window is like any
other client OS window, and embeds a browser's engine inside it without the
accompanying browser chrome. The Weblet can then add UI elements to this
window by manipulating the DOM.
Of course, DirectDom Weblets can be used by non-Java programmers as
well. For example, an HTML author or Java Script developer could reuse
pre-existing Weblets to enhance a Web page or connect to a database.
The developer kit is available on Windows NT and 98 for Microsoft Internet
Explorer 5.0+ (not including the IE 5.5 beta) and the Adobe SVG plug-in. A
DevKit for Mozilla M14 (Windows NT, Windows 98, Mac OS 9, and Linux) will
soon be posted. The developer kit for DirectDom on Internet Explorer is
75
shipped in two forms, one that includes IBM's Java 1.2.2 JDK as well as
DirectDom and one that includes only DirectDom.
3.2.4.2 LotusXSL XSL Processor
XSL provides a mechanism for formatting and transforming XML, either at the
browser or on the server. It allows the developer to take the abstract data
semantics of an XML instance and transform it into a presentation language
such as HTML.
LotusXSL implements an XSL processor in Java, and can interface to APIs
that conform to the October 1 Document Object Model (DOM) Level 1
Specification. The processor can be used from the command line or from an
wrapper applet, or it can be used as a sub module of other programs, and
accessed via the API.
LotusXSL version 0.20.0 is an IBM gold candidate preparing for a 1.0
production-level release. It remains compatible with XML4J 2.x/1.x, as well as
with Xerces 1.0.2, and it is available on Java platforms.
3.2.4.3 SVGView
Scalable Vector Graphics (SVG) is a language for describing two-dimensional
graphics in XML. The language is a new standard being developed by the
World Wide Web Consortium (W3C).
SVGView is a Java program that uses Java 2D and the XML Parser for Java
to parse, process, and display SVG files on any XML-enabled Web browser.
The viewer enables Web professionals working with SVG files to preview
their forms or images. The viewer passes the document to the parser, which
creates the data tree structure. The parser then traverses the tree in Java 2D,
which calls the appropriate functions in the Java2 API. For example, if a
square needs to be drawn, the relevant Java2D function draws the square at
the appropriate location.
For a demonstration of on-line transcoding, including Advanced Function
Presentation (AFP) documents to SVG and Color Graphics Metafile (CGM)
documents to SVG, see the IBM On-Line Transcoding Demo package. You
can use SVGView to display the transcoded output.
SVGView is available on Windows 95, Windows NT, and Windows 98.
3.2.4.4 XML Enabler
The XML Enabler is a servlet that can successfully implement stylesheets
such as the LotusXSL technology. Using the XML Enabler, developers with
any kind of browser can now send requests to a servlet, and as the servlet
76
The XML Files: Using XML for B2B and B2C Applications
responds, it formats the data using different XSL stylesheets. The system
administrator can then configure which stylesheets go with which browser
types.
Therefore, the XML Enabler makes XML real by allowing any user of any
browser to view and use XML data. Most developers in the XML space are
concerned with the heavy client. In other words, you can use XML as soon
as you move to Internet Explorer 4.0 or higher. The XML Enabler technology
removes this impediment and allows the system administrator to focus on
using XML-tagged data intelligently without worrying about the types of
browsers that might be used to view that data.
The XML Enabler uses the XML and XSL technology mentioned above,
combined with the information in the HTTP header. The system administrator
defines the mapping between browser types and XSL stylesheets. Once that
mapping is defined, the servlet gets XML data from a data source, then
formats that data using an XSL stylesheet.
The XML Enabler works with the Lotus Extensible Stylesheet Language
(XSL) Processor to transform data using XSL stylesheets. When an HTTP
request comes in to the XML Enabler, it does three things:
1. Gets the XML document requested by the client (the URL of that
document is passed as a parameter on the URL).
2. Looks at the client type (using the user-agent field of the HTTP header),
and selects an XSL stylesheet. The stylesheet selected for each
user-agent type is defined by the Web master or Web mistress.
3. Once the XML document and the XSL stylesheet are selected, the two are
combined by the Lotus XSL Processor; the output from the XSL Processor
is returned to the client.
XML Enabler is available on all Java platforms.
3.2.5 Programming
When programming an application, the developer needs to manipulate and
access various types of data, and use pre-defined services such as
communication services. This section describes some useful items which
could help the developer.
3.2.5.1 Bean Markup Language
Bean Markup Language (BML) is an instance of an XML-based component
configuration or wiring language customized for the Java Bean component
model. The language is designed to be directly executable; that is,
77
78
The XML Files: Using XML for B2B and B2C Applications
Data is de-coupled from programs. Data can outlive its producer (because
once it's produced, it lives in tuple space) and can be produced before the
receiver exists.
Communication is anonymous. The sender needn't know about the
receiver, and vice-versa. Sender and receiver only need to know about
tuple space, which mediates all communication.
Communication is asynchronous. The sender and receiver don't have to
rendezvous to communicate; the producer produces when it's ready, and
the consumer consumes when it's ready.
Since it is written in Java, TSpace client applications can be loaded
dynamically into any network-attached computer. The TSpaces package
comes with several useful applications that show how to build TSpace clients.
TSpaces is available on all Java platforms.
3.2.5.3 VoiceXML
VoiceXML is an XML-based markup language for distributed voice
applications, much as HTML is a language for distributed visual applications.
VoiceXML is designed for creating audio dialogs that feature synthesized
speech, digitized audio, recognition of spoken and dual tone multi-frequency
(DTMF) key input, recording of spoken input, telephony, and mixed-initiative
conversations. The goal is to provide voice access and interactive voice
response to Web-based content and applications, for example, by telephone,
PDA, or desktop.
VoiceXML is being defined by an industry forum, the VoiceXML Forum
founded by AT&T, IBM, Lucent, and Motorola which was established to
promote the Voice eXtensible Markup Language (VoiceXML).
VoiceXML brings the power of Web development and content delivery to
voice response applications, and frees the authors of such applications from
low-level programming and resource management. It enables integration of
voice services with data services using the familiar client-server paradigm,
and it gives users the power to seamlessly transition between applications.
The dialogs are provided by document servers, which may be external to the
browser implementation platform.
For further information on the VoiceXML Forum and to comment on the
specification, please refer to the VoiceXML Forum Web site
http://www.voicexml.org/.
79
80
The XML Files: Using XML for B2B and B2C Applications
81
IBM XML Security Suite will push the security further by introducing new
security features such as digital signature, element-wise encryption, and
access control that are beyond the capability of the transport-level security
protocol such as SSL. Our goal is to contribute to the discussions of standard
bodies by providing sample implementations, as well as to supply our
advanced technologies to our partners and to hear what they think. In this
release of XML Security Suite, IBM provides reference implementations of
DOMHASH, a proposed canonicalized digest value for XML documents, and
its two sample applications. DOMHASH can be a basis for XML digital
signature that is being discussed in both IETF and W3C.
IBM XML Security Suite is available on Linux, Windows 95, Windows NT, and
Windows 98.
82
The XML Files: Using XML for B2B and B2C Applications
83
84
The XML Files: Using XML for B2B and B2C Applications
85
86
The XML Files: Using XML for B2B and B2C Applications
87
B2
B1
B3
BPF
BPF
selling
purchasing
Backend
Systems
Backend
Systems
A version of BPF is built on top of an Enterprise Java Beans (EJB) server and
employs a diverse set of technologies for providing various functions and
services. A business may communicate with its partners using one of the
several protocols HTTP, SMTP, FTP, VAN, IBM MQSeries. It may even use
different protocols for different sets of actions on a per-TPA basis. Security
technologies include transport security (SSL), authentication using digital
certificates, as well as digital signatures for non-repudiation (using MD5,
SHA-1). Various data formats include EDI, XML-EDI or other XML formats.
Appropriate message parsers or message generators are provided for
converting these documents into an internal format. Independent software
components providing many of these technologies can be plugged in to the
BPF framework via a vendor-neutral open API, thus allowing developers to
customize solutions of their choice.
88
The XML Files: Using XML for B2B and B2C Applications
89
90
The XML Files: Using XML for B2B and B2C Applications
91
XML in EJBs
XML can be used to create deployment descriptor for Enterprise Java Beans
(EJBs). An XML file can be treated manually or by using a graphical user
interface (GUI) of the jetace tool. Once created, the XML file can be used to
generate an EJB JAR file from the command line by using the jetace tool.
The use of XML allows you to easily to deploy a collection of EJBs on servers
other than WAS, without having to manually enter the information by using
the WAS administration console.
Note
In the EJB server environment, use of the XML features described here is
not recommended.
92
The XML Files: Using XML for B2B and B2C Applications
93
A Java servlet that along with WebSphere application server enables DAV
Class 2 methods in the Apache Web server. The Apache Web server can
be configured so that some URLs can be handled either directly by the
Apache server without WebDAV methods while other URLs are handled
by the DAV4J servlet with WebDAV methods. This allows a single Apache
server to be both a production and authoring server on different partitions
of the URL namespace.
The ability to access multiple back end repository managers using a
single, common, standard, simple protocol: WebDAV. The DAV4J
architecture encapsulates low-level repository services required to
implement the WebDAV semantics into a number of simple Java
interfaces. All that is required to provide WebDAV access to a repository
manager is to implement these interfaces on the repository manager.
DAV4J includes a repository manager based on the local file system as a
reference implementation and example of how to integrate a repository
manager. There is also support for the NetObjects Authoring Server
available from NetObjects. Future releases may include support for the
repository managers such as ClearCase from Rational.
Platform independent, 100% pure Java portability.
DAV4J contains the IBM DAV4J client API, the DAV4J servlet, and the file
system repository manager. By changing a few simple properties, the
WebSphere application server can be configured to support the WebDAV
methods in the Apache Web server. WebDAV is described in the IETF draft
specification at http://www.ietf.org.
For further information, refer to http://www.alphaworks.ibm.com/tech/DAV4J.
3.4.1.4 WebSphere Transcoding Publisher
One key intermediary application is the transformation of information from
one form to another, a process called transcoding. Transcoding is already
commonly used in many applications to change data formats, for example to
convert a document from one word processor to another. The need for
transcoding is growing tremendously, as information on the Web becomes
more important and new ways are provided for people to access it.
For example, many Web pages contain large color images that cannot be
viewed on palmtop computers, and XML data on the Web often needs to be
transformed into other forms of XML or possibly into HTML before it can be
viewed. business-to-business communication often requires information to be
transcoded from the formats and structures specific to one company to
formats and structures understood by business partners, suppliers, and
94
The XML Files: Using XML for B2B and B2C Applications
95
96
The XML Files: Using XML for B2B and B2C Applications
97
A pplication
XM L Ad m in.Tool
X M L R ep ository
D a ta Acce ss
D efin itio n
(D A D )
DB2 XML
E xtend er
DB2
Structural
Search Eng.
table
F ile S ystem
XM L do c
CL O B
D a ta Link
98
The XML Files: Using XML for B2B and B2C Applications
XM L
DO C
in d e x
The XML Extender provides several user-defined types (UDTs) for use with
XML columns. A UDT is a data type that is not native to the database
manager and is created by a user. All the XML Extender's UDTs have the
prefix db2xml, which is the schema name of the DB2 XML Extender UDTs.
These data types are used to identify the storage type of XML documents in
the application table. The XML Extender supports legacy flat files; you are not
required to store XML documents inside DB2. You can also store XML
documents as files on the local file system or remote file system, as specified
by a local file name.
The DB2 XML Extender provides powerful user-defined functions (UDFs) to
store and retrieve XML documents in XML columns, as well as to extract XML
element or attribute values. A UDF is a function that is defined to the
database management system and can be referenced thereafter in SQL
queries. All the XML Extender's UDFs have the prefix db2xml, which is the
schema name of the DB2 XML Extender UDFs. The UDFs are applied to XML
UDTs, and they are used primarily for XML columns.
With the XML Extender, your application can:
Store entire XML documents as column data in an application table, either
internally or externally as a local file, while extracting desired XML
element or attribute values into side tables for search.
Compose or decompose contents of XML documents from or into an XML
collection, which consists of one or more relational tables.
Perform fast search on XML elements or attributes of SQL general data
types by converting character strings in XML documents to SQL data
types for indexing.
Update the content of an XML element or the value of an XML attribute.
Extract XML elements or attributes dynamically in SQL query.
Validate XML documents during insertion and update.
Work with the Text Extender to perform structural-text search.
The XML Extender provides an XML DTD repository. When a database is
enabled for XML, a DTD reference table (DTD_REF) is created. Each row of
this table represents a DTD with additional metadata information. Users can
access this table to insert their own DTDs. The DTDs in the DTD_REF table
are used to validate XML documents and to help applications define a DAD.
99
100
The XML Files: Using XML for B2B and B2C Applications
NSF
DXL
X S LT
X M L or
HTML
T he W o rld
XSL
D
Do
om
m in
ino
o
M o dific a tio ns
101
Easy access to the tools developers need. Lotus will include XML
Parsers (the software component that interprets XML tags for processing)
and the LotusXSL processor (a component that maps XML between
differing XML schema, or to HTML or SGML) in the rich set of standard
tools on the Domino Server.
3.4.5.2 Notes client
The 5.02 Notes client also includes DXL; an XML vocabulary for Domino; and
a "readView entries" URL, which exposes NSF files to XML. DXL captures the
exact content of a Domino database, and is accessible through HTTP and
Domino/Notes APIs.
3.4.5.3 Domino designer
Domino Designer provides a medium for writing XML and then serving the
XML data to a parser. Domino Designer is a powerful development
environment that provides the layers of security needed to protect data,
including database access control and field encryption.
You can integrate XML into a Domino application to do any of the following:
Create forms and pages that use XML
Create a view that displays XML data
Embed the view into a page
Apply an XSL stylesheet to XML data
Use agents to access data in other Domino databases
102
The XML Files: Using XML for B2B and B2C Applications
Managed Clients
App
Client
App
Client
App
Client
Management
Server
XML specifications
Management Servers
HTTP
App
App
App
Server Server Server
Management
Server
Server core
services
SSL
ISP
Internet
Managed Clients
ISP
App
Client
XML specifications
Management
Console
HTTP
SSL
Management
Server
App
Client
App
Client
RDBMS
XML specifications
HTTP
Server
HTTP
SSL
103
3.5 Summary
This chapter demonstrated the engagement of IBM in XML technology, and
its commitment to the XML standards. It also described tools and products
that IBM develops to help customers to design, develop, and deploy
e-business applications.
104
The XML Files: Using XML for B2B and B2C Applications
105
106
The XML Files: Using XML for B2B and B2C Applications
4.1 Definitions
This section presents definitions of terms to be used later, in 4.2, e-business
patterns for B2C applications on page 110, and 4.3, e-business patterns for
B2B applications on page 117.
107
108
The XML Files: Using XML for B2B and B2C Applications
109
110
The XML Files: Using XML for B2B and B2C Applications
Application topology
Figure 20 outlines the application topology 1. In this topology, we replaces the
monolithic fat client design with a layered approach. This architecture uses a
thin client with application business logic on the second tier. The second tier
can access a local database maintaining the application data. It aims to
address the scalability problems of client/server and at the same time provide
reuse of the business logic and data by all styles of Web browsers or
pervasive computing devices.
111
T h in c lie n t
(P re s e n ta tio n
lo g ic )
s yn c
a n a p p lica tio n n o d e w h ic h c o n ta in s n e w o r
m o d ifie d c o m p o n e n ts
A p p lic a tio n
(B u s in e s s lo g ic )
re a d /w rite d a ta
You should consider that a Web application server may implement both tiers
of the layered design, but developers should exercise caution. Many vendors
promote ease of development by mixing scripting and components, paying
little attention to engineering the application with separate presentation and
business logic layers. This combined approach should be avoided, as
separation promotes the effective use of discrete skill sets and code reuse.
Failing to separate the layers can lead to code that is hard to maintain and
extend. Also, be aware that you may incur significant departmental system
management costs when the business logic and data are held outside the IT
organization.
Runtime topology
For the Web-up application topology 1, more than one runtime topology are
possible. We chose to only explain the simplest one. Other runtime
topologies are well described in the IBM Redbook Patterns for e-business:
User to Business Patterns for Topology 1 and 2 using WebSphere Advanced
Edition, SG24-5864-00.
The chosen runtime topology, shown in Figure 21, aims to provide an initial
implementation with an entry level footprint. Or, Start simply, grow fast.
112
The XML Files: Using XML for B2B and B2C Applications
D e m ilita riz e d Z o n e
(D M Z )
D o m a in e
N am e
S erv er
I
N
T
E
R
N
E
T
W eb
A p p lic a tio n
S erve r
I n te rn a l n e t w o rk
Domain Firewall
P u b lic K e y
In fr a s tr u c tu r e
Protocol Firewall
O u t s id e w o rld
D ire c to r y a n d
S e c u r ity
S e rv ic e s
D a ta b a s e
U ser
This runtime topology is the most basic one you could associate with the
application topology 1 of the Web-up model:
1. The Web application server (where the Web server and the application
Server are running on the same machine) is in the demilitarized zone
(DMZ).
2. The business logic is implemented on the Web application server.
3. User information, needed for authentication and authorization, is stored in
the directory and security services node behind the domain firewall in the
internal network.
4. The data to be accessed from the business logic is behind the domain
firewall in the internal network.
These are some variations applicable to this runtime topology:
1. Add Web application servers to serve a larger number of users. This, in
turn, has some consequences:
a. A load balancer is used to distribute the incoming requests to the Web
application servers.
b. A shared file system may be installed in the internal network. This file
system provides for shared access to information needed by all Web
application servers.
2. Move the Web application server behind the DMZ to provide more
security. In order to achieve this, this topology:
a. Leaves the Web server in the DMZ.
b. Moves the application server from the DMZ to behind the domain
firewall where it is more secure.
113
c. Uses a Web server redirector to forward the requests from the Web
server to the application server.
3. Add an additional application server behind the DMZ to provide more
security. A Web application server within the DMZ is used for presentation
logic, but all business logic is implemented within the application server
behind the DMZ.
4.2.1.2 Web-up topology 2
Application topology 2 allows for one or more point-to-point connections to
back-end legacy applications or databases. This is a very common
requirement for businesses delivering goods and services over the Web. For
example, an e-commerce application can be integrated with existing
back-end applications such as inventory management.
Often this topology is used to extend existing application topology 1 solutions
to integrate with legacy or third-party systems, for example, inventory
management or credit card checking.
Application topology
Application topology 2 for user-to-business is shown in Figure 22. It allows
the second tiers new application business logic to access existing
applications or data, or third party applications. These applications reside on
a third tier elsewhere in the network.
Thin client
(Presentation)
sync
Application
(Business logic)
App2
sync/async
App1
read/write data
Application topology 2 has the same logical application nodes known from
application topology 1 and at least one additional node, making it a logical
3-tier architecture. Depending on the requirements, this additional logical
layer contains new, modified, or unmodified components, and resides in the
third tier.
114
The XML Files: Using XML for B2B and B2C Applications
Runtime topology
Application topology 2 also can have more than one possible runtime
topology. We chose to only explain the simplest one shown on Figure 23. The
chosen runtime topology providing an extension of runtime topology 1 to
integrate legacy or third-party systems.
Domaine
Name
Server
I
N
T
E
R
N
E
T
Internal network
Directory and
Security
Services
Web
Application
Server
Domain Firewall
Public Key
Infrastructure
Protocol Firewall
Outside world
Existing
applications
and data
User
115
This simple runtime topology suits the application topology 2 of the Web-up
model:
1. The Web application server (where the Web server and the application
server are running on the same machine) is in the demilitarized zone
(DMZ).
2. The business logic is implemented on both the Web application server and
existing applications in the internal network.
3. User information, needed for authentication and authorization, is stored in
the directory and security services node behind the domain firewall in the
internal network.
4. The existing applications and data to be accessed from the business logic
are behind the domain firewall in the internal network.
This topology uses the same nodes as the runtime topology 1 excepted the
existing application and data node.
These are some variations suitable to this runtime topology:
1. You can add Web application servers to serve a larger number of users.
This, in turn, has some consequences:
a. A load balancer is used to distribute the incoming requests to the Web
application servers.
b. A shared file system may be installed in the internal network. This file
system provides for shared access to information needed by all Web
application servers.
2. You can move the Web application server behind the DMZ to provide more
security. It order to achieve this, this topology:
a. Leaves the Web server in the DMZ.
b. Moves the application server from the DMZ to behind the domain
firewall where it is more secure.
c. Uses a Web server redirector to forward the requests from the Web
server to the application server.
3. You can add an additional application server behind the DMZ to provide
more security. A Web application server within the DMZ is used for
presentation logic, but all business logic is implemented within the
application server behind the DMZ.
116
The XML Files: Using XML for B2B and B2C Applications
117
App 1
Translator
Translator
App 2
1:1
async
available buffer
mutually agreed msgs
application node which contains new
or
modified components.
118
The XML Files: Using XML for B2B and B2C Applications
Internal network
Internal network
Managed network
EDI
translation
package
Company A
V
A
N
VAN
Mail box
Existing
Applications
and data
VAN
Mail box
EDI
translation
package
Existing
Applications
and data
Company B
119
App 2
App 1
N:1
async
server-specified m sgs
adaptor (msgs to API)
I
N
T
E
R
N
E
T
Protocol Firewall
Protocol Firewall
E x is tin g
a p p lica tio n s
a n d d a ta
Domain Firewall
Q ue ue
m ana ger
D ire c to ry a n d
S e c u rity
S e rvic e s
DMZ
D om ain n am e
s erv er
Domain Firewall
DMZ
in te rn a l n e tw o rk
Q ue ue
m ana ger
E x ist in g
a p p lic a tio n s
a n d d a ta
P ublic key
i nfra stru ctur e
C om pany A
E x tra n e t
C o m p any B
D M Z : D e m ilita riz e d Z o n e
Messages are sent to and received from queues that are managed by a
queue manager. A queue manager provides a persistent message store and
additional services including transaction support, and routing of messages to
the proper queue. The receiver of a message can be an adapter that
120
The XML Files: Using XML for B2B and B2C Applications
Partner
Intermediate tier
Corporate tier
App 1
1:1
async
App 3
N:1
async
server-specified msgs
adaptor
comp/decomp
rules
1:1
async
App 2
121
internal network
Directory and
Security
Services
I
N
T
E
R
N
E
T
Protocol Firewall
Protocol Firewall
Existing
applications
and data
Domain Firewall
Message
broker
Directory and
Security
Services
DMZ
Domain name
server
Domain Firewall
DMZ
internal network
Message
broker
Existing
applications
and data
Public key
infrastructure
Company A
Extranet
Company B
122
The XML Files: Using XML for B2B and B2C Applications
Intermediate tier
Partner
1:N
sync
App 3
Executable
contract
N:1
async
mutually agreed
msgs
Service
N:M
sync
async
Service
comp/decomp
rules
1:N
sync/
async
Corporate tier
App 2
App 1
123
Domain name
server
internal network
Directory and
Security
Services
Web
application
server
Domain Firewall
I
N
T
E
R
N
E
T
Protocol Firewall
Existing
applications
and data
Domain Firewall
Directory and
Security
Services
Protocol Firewall
Demilitarized Zone
(DMZ)
internal network
BPF
manager
Existing
applications
and data
Public key
infrastructure
Company A
Extranet
Company B
124
The XML Files: Using XML for B2B and B2C Applications
125
Intermediate tier
Partner
N:1
sync
Service
Executable
contract
Service
sync/async
Corporate tier
Executable
contract
N:M
async
mutually agreed
msgs
comp/decomp
rules
sync/async
1:N
sync
Service
Service
sync/async
comp/decomp
rules
sync/async
App 4
App 3
App 2
App 1
126
The XML Files: Using XML for B2B and B2C Applications
Existing
applications
and data
BPF
manager
Web
application
server
Protocol Firewall
Directory and
Security
Services
Domain Firewall
internal network
Domain name
server
Company A
T
NE
ER
T
IN
Public key
infrastructure
internal network
Web
application
server
Domain Firewall
Extranet
Protocol Firewall
Directory and
Security
Services
BPF
manager
Existing
applications
and data
Company B
Figure 33. Runtime topology: Internet jointly managed
127
128
Nodes
Products
Application server
BPF manager
Database
non applicable
DataInterchange
Load balancer
Network Dispatcher
SecureWay Directory
Message broker
MQSeries Integrator
secureWay Firewall
eNetworkFirewall 3.2
User
directDOM
lotusXSL
VAN mailbox
non applicable
non applicable
The XML Files: Using XML for B2B and B2C Applications
Nodes
Products
As you can see, XML technology plays a large part in the implementation of
both B2C and B2B solutions.
129
However, no singular XML design solution can be found. Of course, there are
some great products in the XML server and the Java/XML arenas, and many
include companion XML design and authoring tools. But many developers
need to know the intricate details of XML to get their solutions to work.
Still, you can find a few useful tools (see 3.2, IBM XML development tools
and utilities on page 63). Many of these are new and do not really leverage
the concept of integrated development environment.
This section intends to give you some considerations about the usage of XML
and also some ideas to take advantages from this technology.
We also recommend reading the IBM Redbook The XML Files: Using XML
and XSL with IBM WebSphere 3.0, SG24-5479-00. This book shows several
different ways of how and where XML can be used in a B2B and B2C
environment.
130
The XML Files: Using XML for B2B and B2C Applications
One of the reasons that XML has taken off so extensively in the database
world is that it gives you a system-agnostic way of exchanging data. If you
can get your data into an XML form, then you can send it across the Internet
to your customers and they can use XML to retrieve that information into their
own database system, regardless of which system is being used. The key to
this capability comes from the transformation language XSL (Extensible
Stylesheet Language), which can convert XML from one form (or schema) to
another. That way, you can build a way for your customers to query your
database without compromising the integrity or security of your data.
131
XSL/XSLT
processor
database
legacy
7
6
XML DOM
Java Servlet
2
1
HTML
Client
HTM L
XML DOM
XML
DOM
XML Parser
XSL
stylesheets
XML
Docum ents
HTML
XML DTDs
Web
application
server
9
Figure 34. Typical design for a Web application with XML
132
The XML Files: Using XML for B2B and B2C Applications
the panoply of XML-based standards for well, just about everything having
to do with data manipulation, transformation, and presentation.
Extensible Stylesheet Language, or XSL, is most interesting. XSL addresses
the fundamental problems of the servlet programmer-how to design a site
that is simultaneously dynamic, maintainable, attractive, and inclusive to all
browsers. Simultaneously, because XSL addresses the issue of presentation
of data in a browser, just as HTML does, it makes a good introduction to XML
applications.
XSL is great for rendering; unfortunately, according to browserwatch.com,
less than 20% of users are using IE 5, the only XSL-enabled browser on the
market. Coming to your rescue are the Open Source programmers of the
Java Apache Project, in particular the server-side XSL transformation engine
called Cocoon (see 3.2.1.1, Cocoon XML-based Web publishing on page
66).
Figure 35 shows how simple is to use Cocoon; for example, placing the
Cocoon, parser, and processor .jar files in the classpath, making the Cocoon
servlet available in your servlet server (which varies between servlet servers,
of course), and telling your Web server that when a file with an xml
extension is requested, the org.apache.cocoon.Cocoon servlet should be called.
The Cocoon servlet takes care of transforming the XML and XSL into a
well-formed HTML document, which is sent to the client.
133
database
XSL stylesheets
myDoc.xsl
Java servlets
Cocoon
servlet
XSL/XSLT
myDoc.xml
myDoc.xml
Client
myDoc.html
XML Documents
myDoc.xml
myDoc.html
Web
application
server
XML DTDs
myDoc.dtd
OO design
approach
The real excitement, though, is when your XML file contains multiple XSL
style tags like this:
<?xml version="1.0">
<?xml-stylesheet href="postlist.xsl" type="text/xsl">
<?xml-stylesheet href="postlist.tables.xsl" type="text/xsl"
media="netscape">
Cocoon matches the user-agent HTTP parameter with a map defined in the
Cocoon initialization file to choose between different XSL stylesheets. This
solves what we are tempted to call the problem of Web design support for
multiple, incompatible browsers. As anyone who designs Web sites knows,
it's not hard to create a page that works in Browser X or Y, it is hard to create
one that works in both X and Y. The promise that the domain content could be
kept in a database, and that presentation logic could be kept in individualized
transformation files tailored to the browser is close to the ideal dynamic Web
site architecture.
XML and XSL do not address the issue of domain behavior. You do not want
to place such behavior in the XSL transform pages, because then you've
134
The XML Files: Using XML for B2B and B2C Applications
fallen right back into the trap of combining presentation and domain aspects.
Rather, domain behavior is the role of server-side Java components. How are
method calls triggered? That's the role of SAX, the Simple API for XML, not to
be confused with SOX. Ideally, the XML dataset would be created by some
kind of dynamic database query. The resulting dataset would be transformed
by your server-side Java components, and the resulting dataset would be
transformed for presentation by the XSL processor.
135
grade the test and provide feedback to readers after they've answered the
questions. In principle this is all very easy to do, especially if you pick the
right technologies XML and servlets. The key strength in XML is that it was
designed to represent arbitrary, hierarchical data, lending structure to an
otherwise potentially undistinguished piece of information. We're going to use
XML to represent questions in an online test.
By using an XML parser to build a Document Object Model and using that
model to construct dynamically generated HTML, we can provide access to a
variety of information without having to create more elaborate representations
on separate Web pages.
4.4.7 Performance
XML does nothing to speed up the data transfer. It instead adds an element
of performance loss. Consider that the information could have been sent in a
single file as HTML with all the formatting contained in that file. The two trips
to the server would have been reduced to one, and the client-side processing
would have been eliminated. Processing an XML file results in significant
additional server load, and contributes to delays in file downloading at a time
when research indicates fast downloads are a usability priority.
136
The XML Files: Using XML for B2B and B2C Applications
4.4.8 Security
One of the problems with XML is that the markup language does not provide
for both secure and open transfer in the standard. Once the information is in
XML format, anyone can use a parser to dump the information into a
database. But if the same information were to be presented in HTML, it would
be more difficult to move the information to a database. This is because the
HTML formatting does not need to be exact in order for the browser to
represent the information. While dealing with business partners, it could be
more convenient to present information in XML for data transfer. Even though
this doesnt mean security, the same information could be presented in HTML
to others, this would increase the difficulty level for them to use the data.
IBM has unveiled the first security scheme for XML that takes advantage of
its ability to define and protect individual elements on a page. The XML
Security Suite from IBM puts tools into the hands of developers for encrypting
specific fields of a business form, such as the amount of a salary or contract,
while the remainder of the form is transmitted in unencrypted text. In a
Web-based transaction, the buyer's credit-card number is encrypted on an
XML form, while the rest is unchanged.
The IBM suite of XML security tools includes XML Digital Signature, which
can verify that a document was sent by a given party, and a hashing algorithm
that lets an XML document check if the contents were tampered with.
4.5 Summary
This chapter gave you the basic information you will need in preparation for
developing B2C and B2B applications. Here is a suggested course of action:
1. Find an application topology for your application.
2. Choose a runtime topology according the application topology your
application matches.
3. Reuse existing solutions or tools for the runtime topology nodes (product
mapping).
4. Take advantage of the combination JAVA (portable code) and XML
(portable data) to code your application.
At the end of this chapter we explained some interesting points that may help
you to implement your Web application with XML.
137
138
The XML Files: Using XML for B2B and B2C Applications
139
The World Wide Web, as a unified communication and user interface method,
provides key technologies for B2C applications. Companies establish Web
sites (called portals), design client- and server-side Web applications, and
connect these Web systems to their internal information infrastructure to
implement B2C services.
However, immature Web technologies and proprietary company information
management and data exchange solutions are causing several problems in
todays B2C solutions. The main technical problems are the following:
It is difficult to access company data, applications, and people, due to
differences in application interfaces and management software used at
different companies, or even within the same company.
Company applications use different data representations and access
methods, and the information contents of data files are not self-describing
(other, application-specific information is required to interpret them).
The costs of maintaining customer relations over the Internet are high due
to the poor data representational formats, proprietary application
interfaces, and low automation level of these tasks.
The provided services are limited they do not utilize the full possibilities
of todays company information systems, because of the previously
mentioned application interface and data representation problems.
There are already several initiatives to solve these problems. Application
providers started to develop new interfaces and modules for their applications
to enhance the integration with Web and other internet technologies. XML
can also help in the solution. On one hand, it is a new Web document format
that enhances document representation, access and presentation. On the
other hand, it promises application-independent, self-describing data
exchange for greater flexibility and interoperability.
In the following sections we examine the B2C application model, architecture,
typical components, and the role of XML in these areas.
140
The XML Files: Using XML for B2B and B2C Applications
Client side
Web
browser
back end
other
client
applications
applications
Front end
Web server
back
other end
applications
front
end
applications
back end
back
end
applications
applications
Back end
company
database
141
back end
other
client
applications
applications
Web
browser
Client side
HTTP
back
other end
applications
front
end
applications
Web server
Front end
ODBC/JDBC
ORB
back end
back
end
applications
applications
Back end
company
database
142
Other API
ORB
The XML Files: Using XML for B2B and B2C Applications
Other API
143
Multiple presentation formats for different delivery types, like Web, paper
or CD-ROM.
As a document exchange format, XML helps in:
Flexible interchange of documents and metadata between applications
Standardized interchange to support wide range of applications
Integration of data from other sources, for example, from databases
Transferring complex, application-specific data in business-to-customer
applications
As a document delivery technology, XML has these advantages:
It integrates to client application without need for manual editing or
presentation transformation.
It allows rich presentation formats that can be individually tailored to
customers needs.
Using XML, data can be processed at the client side controlled by the
customer for maximum flexibility.
The following sections will introduce enterprise portals, todays products to
connect costumers to companies over the Internet. We will identify the main
components and the roles XML plays (or can play) in these systems.
144
The XML Files: Using XML for B2B and B2C Applications
data
back end
applications
applications
people
Figure 38. Enterprise portals connect data, applications and people together
145
146
The XML Files: Using XML for B2B and B2C Applications
Internet and Intranet integration means providing access for both internal
and external users, maintaining different access options, content and
services.
Integrating different front end portals means that the company builds a
solid, unified Web portal from its independent portal services (like sales,
support, and so on).
The highest level of portal solutions is, for example, an application service
provider, who integrates different companies portals into a common
frame, and resells their services and products to customers.
Internet
Internet
client
Intranet
client
portal
client
portal
back end
back end
Internet portal
client
client
portal
portal
portal
portal
portal
Company A
back end
back end
Integrated portal
portal
portal
Company C
Company B
Data and application integration is the primary area where XML can help in
building B2C applications. As a document exchange format, it can
standardize the data exchange between front and back end servers, making
147
148
The XML Files: Using XML for B2B and B2C Applications
retrieved
data
back end
back
end
applications
applications
displayed
data
portal
user
Content
manager
company
database
Content
by
reference
Portal
content
User
data
Todays Web and data exchange technologies do not really help in building
automated content management systems. HTML, the main Web document
149
150
The XML Files: Using XML for B2B and B2C Applications
retrieved
data
XML
back end
back
end
applications
applications
XML
displayed
data
Content
manager
XML
portal
user
XML
company
database
XML
XML
Content
by
reference
Portal
content
User
data
151
So far, there is no support or common solution for this kind of access control
in XML-based document management systems. Current applications use
document-based access restrictions, which are also in used in the World
Wide Web environment.
152
The XML Files: Using XML for B2B and B2C Applications
client side
back end
front end
Request
handling
input processing
user identification
My Personalized Page
Sugge sted items of i nte rest:
New f inancing options announced
My fa vorite
links
Business
logic
Business
applications
content retrieval
personalization
document assembly
User and
profile
database
Output
generation
transcoding
output generation
The customization and the quality of dynamic content generation is they key
element in personalization. There are several approaches to build
profile-based content generation. The content presented to the user can be
created in different ways from the master content of the portal:
Simple filtering displays the content by filtering the master content
according to the users profile and the actual information shown. For
example, if a user is a customer, and currently visits a customer support
Web site, the portal may want to show links to customer-related support
sites within the company.
Rule-based content generation generates content according to rules and
information from the users profile. Rule-based content generators make
simple decisions based on available information. For example, if a
153
154
The XML Files: Using XML for B2B and B2C Applications
155
156
The XML Files: Using XML for B2B and B2C Applications
157
applications. For the previous problem, the secure HTTP protocol (HTTPs),
and the Secure Socket Layers (SSL) technologies provide solutions.
Customization is also a key issue in e-commerce applications. Providing
customizable services to buyers became a standardized part in most of these
applications, software vendors already include these features in their
applications. Merchants also try to collect more and more information about
their users, and build more sophisticated user models, to enhance their
services.
Tomorrows Web will use the XML to encode information about products and
services with meaningful structure and semantics that can be used to build
more precise search and matching algorithms. Vendors can use the XML
format to describe and publish information about their products and services
in a way that other companies, merchants and customers applications
understand. This eliminates the need for custom product interfaces between
vendors, merchants and customers. It also makes electronic commerce
applications ready to automate, to use by customers software agents that
collect and compare information automatically. However, merchants might
initially dread that XML-encoded information makes too easy for customers to
compare specifications and prices with competitors.
XML, as a meta language makes it possible to create specialized markup
languages (vocabularies) for selling and buying goods and services. The
main areas for XML in e-commerce are metadata descriptions of products
and services, and information exchange between companies. XML RDF
(Resource Description Framework) and XMI (XML Metadata Interchange) are
typical base standards that enable higher level specifications to be
developed. See 1.2.7, Metadata (RDF and PICS) on page 21 for more
details about these base standards.
To maintain the interoperability between various vendor systems, there is a
need for standardized XML vocabularies. There are several initiatives to
solve this problem. IBM is working with the industry to develop standards for
e-commerce. There is a tremendous amount of activity within IBM and across
the industry in using XML for commerce standards. There are numerous uses
for XML, but the following proposed standards relate to commerce and reflect
IBM's participation. Although these initiatives primary concentrate on the
business-to-business part of e-commerce, some parts also refer to the
business-to-customer relation.
Product Information Exchange (PIX) is a set of protocols that support
catalog interoperability on the Internet through defined guidelines for
158
The XML Files: Using XML for B2B and B2C Applications
159
160
The XML Files: Using XML for B2B and B2C Applications
The W3C Mobile Access Activity describes a system based on the CC/PP for
Web applications. They propose that CC/PP could be used in Web
applications to provide standardized descriptions of the clients. When a client
device makes a request for a Web document, it sends an URL to its resource
description (along with the URL to the requested document). This URL goes
straight to the CC/PP database. This means that the profile of the device will
become available to the Web server. On this bases the server can create the
appropriate content for the device (and user).
There are several ways to create different content for different profiles. There
could be previously created content files for different devices. There could be
a mechanism for creating these pages on the fly by transcoding other
documents. Figure 43 shows an example transcoding architecture from an
earlier ibm.com site architecture.
There is also a way to describe the same content and associate to it different
ways of presentation. According to W3C activities, XHTML is being designed
161
162
The XML Files: Using XML for B2B and B2C Applications
was written to simplify searches across the ibm.com site. When a user asks for
information, the results of that request are marked up using our search
results DTD. This makes it easy for the user to find further information or
related information, based on their original search. The product navigation
DTD allows to define a class of documents to find specifications, support
information, press releases, and other information more easily.
There are several prototype systems to deliver XML content to the client. The
first prototype used the client to process XML markup. The second prototype
IBMs XML Enabler, a Java servlet that processes XML documents and XSL
stylesheets to generate HTML documents dynamically. Finally, the third
prototype (Figure 45), which is used in production at the time writing this
book, converts the XML documents into the various HTML pages before any
client requests were processed. It uses XSL to format the pages into the
output presentation format. When requests come in, it can quickly determine
which preprocessed XML document matches the request, then return that
document to the user. Because XML- and XSL-enabled browsers are
beginning to appear on the market, there is also a caching mechanism to
serve the original XML and XSL documents to browsers capable of rendering
them. This allows the client machine to provide additional function, such as
163
an XML source view, not possible with the generated HTML file. This latest
approach is scalable to the traffic volumes used by ibm.com.
Patent Server
The IBM Intellectual Property Network (http://www.patents.ibm.com) is a
premier Web site for searching, viewing, and analyzing patent documents.
The IPN provides free access to a wide variety of data collections and patent
information including...
It provides several different search interfaces. If you already know the patent
number, a simple query will return the essential information for that patent.
More complex searching interfaces provide free-form searches that can
include all of the patent office bibliographic data fields, and the claims.
164
The XML Files: Using XML for B2B and B2C Applications
Developer portal
The developerWorks portal (http://www.developer.ibm.com) is a part of the
IBM Partnerworld for Developers worldwide program supporting developers
who build solutions using IBM technologies.
The portals new data model design is based on XML. The site designers
created DTDs for developer-related content (standards, news stories, case
studies, tool descriptions, and so on). They facilitate XSL translations to
possible share the content with other developer-related Web sites, and to
distinguish the presentation from the information content. The current version
uses a Domino server for storing and serving documents. The new version
(Phase 2) will rely on DB2 and XML Extender technologies for better
performance. Depending on the clients needs, the content will server in
HTML, or using XML/XSL.
My dW, as part of the portal services, provides personalization support for the
site. Phase 2 uses Lotus Domino R5 as the Web application server that
organizes and manages user profiles, developerWorks content, and
personalization rules. The user profile information is stored in a DB2
database, and the rule manipulations and content associations are also done
in DB2. A Java servlet establishes the link between Domino and DB2
databases loads data from Domino databases into the right DB2 structures.
The rules are executed in DB2, and the Java servlet returns the results.
Domino publishes the targeted content on the personalized My dW site.
165
Development
Development
Access
Access and
and integration
integration
Information
Information
EIP
Applications
Applications
People
People
Websphere
Raven
166
The XML Files: Using XML for B2B and B2C Applications
Scanned
Documents,
Compoter
Output
Federated
Search
Intranet &
Internet
Sites
Intelligent
Mining
DB2 IMS
VSAM
Oracle
Sybase
Workflow
Collaborative
Document
Library
ERP
System
Content
...
Business
Intelligence
Connectors
Rich
Media
Repository
167
Custom Portal
File
System
Web
Sites
Content
Catalog
Domino
Databases
Document
Library
other
Figure 48 shows the general architecture of the Lotus Raven suite. The portal
organizes assets by community, interest, task or job focus. The discovery
168
The XML Files: Using XML for B2B and B2C Applications
Federated
Search
Intelligent
Mining
Workflow
Bus Intelligence
Connections
...
File
System
Web Site
Domino
Databases
Document
Library
ERP
RDBMS
Rich Media
Repository
Figure 49. Integrating Lotus Raven and IBM Enterprise Information Portal
169
170
The XML Files: Using XML for B2B and B2C Applications
Servlets
access to data
EIP
Interaction
control
JSPs
Command beans
access to information
Page
construction
WCM
portal services
clients
Digital
Library
EAB
Commands
CICS
MQSeries
SAP
others
MQ
metadata handling
resource definitions
user definitions
personalization
rules
Figure 51. WebSphere integrates users, data, applications; offers portal services
171
Transcoding
The IBM Transcoding Technology contains a set of basic content
transformations for modifying Web data, such as HTML pages, GIF or JPEG
images, and XML documents. It uses standards-based technologies for the
data transformation, including Java, XML, XSL, Wireless Application Protocol
(WAP), and Wireless Markup Language (WML). It uses JImage, a
standards-based IBM Research technology, to transcode images, photos,
and graphics.The initial content transformation mechanisms can be extended
by IBM, independent software vendors (ISVs), or customers using plug-ins.
The WebSphere Transcoding Publisher contains a set of transcoder plug-ins
that transform Web content:
Modify HTML documents, such as convert images to links to retrieve
images; convert simple tables to bulleted lists.
Remove features not supported by a device (such as JavaScript, applets,
or Shockwave files); remove references to image types not supported by a
device; and remove comments.
Transcode GIF and JPEG images by reducing scale, color level, or both to
make images smaller, easier to transfer, and quicker to render on
constrained devices.
Convert JPEG images to GIF images for devices that support only GIF
images.
Transform XML documents by selecting and applying the right stylesheet
for the current request based on information in the relevant profiles.
Define profiles for preferred transcoding services for an initial set of
devices, such as the 3COM Palm Pilot III using versions of HandWEB,
172
The XML Files: Using XML for B2B and B2C Applications
modifying existing
developing new
Developer
toolkit
device profile
application profile
user profile
network preferences
Profiles
Transformation plug-ins
customer-provided
transformation
Image
Text
XML
Transcoding framework
...
custom
Administration
framework configuration
registration of stylesheets
The Publisher also has a developers toolkit for building custom transcoding
plug-ins, and administration services to control the configuration and
preference profiles.
WebSphere personalization
WebSphere provides several components to deploy personalized solutions. It
handles user profiles, allow the definition and management of rules for
personalization, and has a content model that stores attributes and hierarchy
of documents. The WebSphere product family also offers development tools
to build personalized Web applications.
WebSphere User Profile is an Enterprise Java Bean that implements the
WebSphere Resource class. It can be mapped to an existing database, to
other data sources, and a new database can also be created during the
definition of the user profile. WebSphere Rules class describe actions in
173
174
Area
Content management
DB2 KnowledgeX,
DB2 Intelligent Miner for Text, Intelligent Miner for Data
Visual Warehouse, DB2 OLAP Server
DB2 Digital Library, Content Server
Clever, Domino (extended search)
Lotus LearningSpace
Security and
access control
Personalization,
user task management
Collaboration
Workflow and
business intelligence
Complete solutions
E-commerce
The XML Files: Using XML for B2B and B2C Applications
5.4 Summary
This chapter introduced business-to-customer applications, and gave a
detailed description of enterprise portals that are the most common B2C
applications.
We characterized what roles XML can play in building B2C applications. As a
source data description format, it can help in metadata description, structured
data representation, automatic document validation, document management,
and different presentation. As a document exchange format, it standardizes
application data exchange, integrates data from different sources, and
transfers complex application data in an application-independent way. As a
document delivery technology, it enhances client presentation, integrates with
other client applications, and advances data processing at the client side.
Enterprise portals, as a mainstream technology for business-to-customer
e-business, share a common, layered architecture, and have several
important features and components such as data and application integration
with users, content management, user recognition, and personalization. We
showed how XML can help in improving these areas.
At the end of the chapter we presented IBM portal initiatives, B2C product
offerings, and tools for building enterprise portals.
175
176
The XML Files: Using XML for B2B and B2C Applications
177
The benefits of business integration are most obvious in the context of the
following major business opportunities. However, the benefits of such
solutions reach well beyond these areas:
Business to business integration
Merger and acquisition integration
Supply chain integration
Customer relationship management integration
Enterprise resource planning (ERP) packaged application integration
Straight-through processing
Web integration
Each business scenario offers tremendous opportunities for cost savings and
winning a competitive advantage. And, each requires the integration of
business strategy with IT strategy business integration.
In each scenario, what is needed is the unification of an improved or changed
business model with the supporting information technology.
Business integration can provide significant value to a company; for example:
Uniting diverse businesses so it is possible to deliver products to market
faster
Deriving a single customer view so customers needs can be better served
Cross-selling products and services through a better understanding of
customers buying patterns
Linking the Web to the company business strategy to reach new
customers and provide new services to existing customers
Revitalizing the supply chain to reduce costs and get company products to
market faster
Responding faster to business change
In the business integration prospective, the opportunity of the inter-company
integration (business-to-business) appears to have the much more impact on
the emerging new economy.
In fact, in the new economy, market dynamics will dictate a business model
that provides for the integration of different partners in a value chain. Using a
variety of IT technologies, this model can enable highly coordinated trading
communities, each with the ability to operate like a "virtual enterprise".
178
The XML Files: Using XML for B2B and B2C Applications
179
180
The XML Files: Using XML for B2B and B2C Applications
181
Description
XML.org
Web Address:
http://www.xml.org
ebXML project
Web Address:
http://www.ebxml.org
Distributed Management
Task Force
Web Address:
http://www.dmtf.org
182
The United Nations body for Trade Facilitation and Electronic Business
(UN/CEFACT) and the Organization for the Advancement of Structured
Information Standards (OASIS) have joined forces to initiate a worldwide
project to standardize XML business specifications. UN/CEFACT and
OASIS have established the Electronic Business XML initiative to
develop a technical framework that will enable XML to be utilized in a
consistent manner for the exchange of all electronic business data.
Industry groups currently working on XML specifications have been
invited to participate in the 18-month project.
cXML is an open XML-based standard created to facilitate e-commerce
within trading communities. The Commerce XML initiative started by
Ariba Technologies includes among other 40 leading companies in the
B2B and B2B fields. cXML is a suite of lightweight XML Document Type
Definitions (DTDs) and their associated processes that define the
exchange of catalog content and transaction information between buyers
and suppliers.
The DMTF is the industry organization that is leading the development,
adoption and unification of management standards and initiatives for
desktop, enterprise and Internet environments. DMTF has taken on
enterprise focused industry initiatives and standards such as the Web
Based Enterprise Management (WBEM) initiative, the Directory Enabled
Networks (DEN) initiative and pioneered the use of XML as the transport
encoding for WBEM.
The XML Files: Using XML for B2B and B2C Applications
Description
eCo Specification
Web Address:
eco.commerce.net
RosettaNet
Web Address:
http://www.rosettanet
.org
XML/EDI Group
Web Address:
http://www.xmledi.com
In parallel with the general XML B2B framework initiatives, the development
of a large set of vertical market vocabularies (connected to a specific
industry sector or cross-industry) has been started during recent years. For a
list of organizations known to be producing industry-specific or cross-industry
XML Specifications see, for example, the XML.org XML Catalog:
http://www.xml.org/xmlorg_registry/index.shtml.
183
184
The XML Files: Using XML for B2B and B2C Applications
Most of the remaining sections are based on the recent tpaML language
standard proposal that IBM has submitted to the OASIS Consortium, the
vendor-neutral organization for XML interoperability, within the XML.ORG
initiative at the end of January 2000. The tpaML has been submitted as a
draft to OASIS for potential ratification as a standard. This means that the
specification will be subject to change as the standardization process
progresses. This draft material is highly recommended for more complete
reading and can be downloaded at the following Web address:
http://www.xml.org/xmlorg_resources
185
186
The XML Files: Using XML for B2B and B2C Applications
187
Trading partner
BP
BP
N o shared middleware
Trading partner
BP
BP
Back-end integration
Passive network
Applications
Business
Applications Process
Applications
Business
Process
Applications
W orkflow
Back-end integration
Applications
Applications
XML
W orkflow
TPAs
For example, in a travel application, the TPA might define the interactions
between the travel agent and a hotel company starting with making the
different reservations needed by the traveler, to the check-in processes
during the trip, and ending when the traveler checks out at the last stop. This
sequence of steps is a single long-running conversation.
A UOB is performed under the TPA by instantiating the TPA as a long-running
conversation. To perform many UOB, the TPA may be instantiated as many
long-running conversations as is appropriate to the application and the
processing capabilities of the parties' systems.
Figure 54 shows the main information that a TPA contains.
188
The XML Files: Using XML for B2B and B2C Applications
overall properties
identification
security properties
error handling
Information flow
TPA
cancelling
rules
roles
communication
propeties
sequencing rules
actions
189
Although this book contains extensive details from tpaML, the tpaML
definition is still evolving, and many changes will be made, taking into
account comments coming from the XML.org working group and other
sources. Therefore, the reader is strongly recommended to use the
information reported here along with the tpaML specification that will be
updated next future. The tpaML specification on which we based the
information proposed here is the 1.0.3.
An XML B2B framework that supports TPA typically has to provide a graphic
TPA-authoring tool that understands both the semantics of the TPA definition
and the XML syntax. IBM, for example, is developing the IBM XML Visual
XML Builder, which is an XML visual tool including several specialized editing
features that can be effectively used to build TPAs. In Section 6.2.4, Using
the IBM Visual XML Builder for a specific OBI TPA on page 216, for example,
we will show in practical terms how to build a TPA by using the IBM XML
Visual Builder tool.
As tpaML has specified, this makes it feasible to automatically generate, at
each party's site, the code needed to execute the TPA, enforce its rules, and
invoke the application-specific programs. Many fields in the TPA are the
same in most TPAs; the authoring tools and TPA templates can supply these
190
The XML Files: Using XML for B2B and B2C Applications
fields. Where appropriate, the tool can supply default values for many fields;
these only need to be stated when values other than the defaults are desired.
The TPA document is described by an XML Document Type Definition or
XML-Schema file, which defines the tree structure of the TPA tags and some
XML syntactic rules but not rules defining specific values of the tags or the
semantic interrelations among the tags. These semantics are defined by a
textual design document and are embodied in rules, understood by the
authoring tool, which aid in the creation of a valid TPA.
191
192
The XML Files: Using XML for B2B and B2C Applications
When the authoring tool replaces the role parameters by actual party names,
it either asks the author for party-specific information or finds this information
in a previously-built database.
The optional comment section ( <Comment> ) may contain any reference text
that must be included in the TPA.
Note
TPA Preamble
The preamble identifies the TPA and its participants and defines some
invocation-independent properties such as the valid duration. The preamble
is defined by the information under the < TPAInfo> tag.
Table 18 lists all types of information that be arranged under the TPA
preamble section.
Table 18. The TPA Preamble section
Sub-Section Name
XML Tag
Description
Identification
<TPAName>
TPA Type
<TPAType>
Sub-tags:
<Protocol>
<Version>
<Type>
193
Sub-Section Name
XML Tag
Description
Role Definitions
<Role>
Sub-tags:
<RoleDefn> <RoleName>
<RolePlayer>
Participants
<Participants>
Sub-tags:
<Member>
<PartyName>
<CompanyTelephone>
<Address>
<AddressType>
<AddressLine>
<City>
<State>state_name</State>
<Zip>
<Country>
<Contact>
<LastName>
<FirstName>
<MiddleName>
<Title>
<ContactTelephone>
<Email>
<Fax>
<Arbitrator>
TPA Lifetime
<Duration>
Sub-tags:
<Start>
<End>
<Date>
<Time>
194
The XML Files: Using XML for B2B and B2C Applications
Sub-Section Name
XML Tag
Description
Invocation Limit
<InvocationLimit>
Concurrent Conversations
<ConcurrentConversations>
Conversation Instantiation,
Closure, and Lifetime
<ConversationLife>
<TerminateConversation>
195
</Role>
<Participants>
...
</Participants>
<Duration>
<!--valid duration for TPA-->
...
</Duration>
<InvocationLimit>number</InvocationLimit>
<!--number of instantiations permitted before
renegotiation is required-->
<ConcurrentConversations>number</ConcurrentConversations>
<!--Maximum number of concurrent conversations
permitted-->
<ConversationLife>time</ConversationLife>
<!--maximum lifetime of a single conversation-->
</TPAInfo>
Transport layer
The transport section defines communication protocol, encoding, and
transport security information. Specific forms of address are defined for each
of the access protocols. The overall structure of the transport section is:
<Transport>
<Communication>
</Communication>
<TransportEncoding>encode</TransportEncoding>
<TransportSecurity>
</TransportSecurity>
</Transport>
196
The XML Files: Using XML for B2B and B2C Applications
HTTP
MQSeries
VAN-EDI
SMTP (*)
197
The optional <Version> tag identifies a specific version of the protocol. The
value of this tag is a character string.
The <...Node> tag identifies each party and its communication addressing
information. The name of the node tag is specific to each protocol, in the
example above since the HTTP protocol is used the <HTTPNode> tag is
specified. There is one <...Node> tag for each party. It identifies the party
name using the <OrgName> tag that contains an ID reference attribute
pointing to the corresponding <PartyName> tag under <Participants> (see the
previous section). All parties must be represented the <Communication>
section including the <Arbitrator>. Under the <...Node> tag is also the
unique electronic address of the party: the URL address in our case. This
address is contacted for creating an information-delivery channel. The form of
address differs for each communication protocol. Finally, the <NetworkDelay>
tag defines the expected worst-case round trip network delay for any
message and its response. This delay excludes service time at the recipient
of a message prior to its sending a response. Other tags in other parts of the
TPA define the service time. There is a unique communication address tag for
each protocol.
The last subparts of the <Transport> section: <TransportEncoding> and
<TransportSecurity> sections specify, respectively, how the transport level
encodes messages for transmission (currently, BASE64 is the only choice)
and the security specifications for the transport layer of the TPA. This second
tag may be omitted if transport security will not be used for this TPA. Unless
otherwise specified below, transport security applies to messages in both
directions.
198
The XML Files: Using XML for B2B and B2C Applications
</MessageSecurity>
</DocExchange>
199
The <ServiceInterface> tag defines the services provided by a party that acts
as a server and the characteristics of the party that is a client. As we will see
in the following paragraphs, these services include the list of actions provided
by that server, their characteristics, and the actions permitted initially. The
TPA contains a separate service interface definition for each party that acts
as a server.
Note
For some applications, each party may have both server and client
characteristics, that is, each party may issue requests to the other party.
The <ServiceInterface> tag has one attribute, InterfaceId. The value of this
attribute is an alphanumeric string that contains an identifier for this service
interface. Each service interface must have an ID that is unique within the
TPA. An example is: InterfaceId="SERVER01".
The <ServiceInterface> section syntax is:
<ServiceInterface InterfaceId=id>
<!--Example: InterfaceId="SERVER01">
<OrgName Partyname=name/>
<!--The party that acts as a server-->
<Client>
<OrgName Partyname=party/>
<!--Party that acts as a client-->
</Client>
<TaskName>name</TaskName> <!--optional-->
<ActionMenu> <!--see "Action Menu"-->
<Action> <!--one for each action-->
...
200
The XML Files: Using XML for B2B and B2C Applications
</Action>
</ActionMenu>
<ServerServiceTime> <!--see "Server Service Time"-->
...
</ServerServiceTime>
<StartEnabled>
<RequestName>action_name</RequestName>
<!--one for each action permitted as the initial
action-->
</StartEnabled>
<TerminateConversation> <!--optional>
<RequestName>action_name</RequestName>
<!--one for each action defined as ending a
conversation-->
</TerminateConversation>
<ServiceSecurity>option</ServiceSecurity>
<!-- option is yes or no-->
</ServiceInterface>
201
Actions
For each party to the TPA which can act as a server, there is an action menu
which identifies the permissible action requests and their characteristics.
Each action is a unit of work defined in the TPA. It consists of a request for
service and associated information (for example, maximum expected
response time for the action). An action may be associated with multiple
message flows. Some actions can be revoked by corresponding cancel
actions defined in the TPA.
Each action is invoked via a request message. During the long execution
period, the service provider can send one or more informative messages,
followed by a final reply message. A completed action can be canceled
according only to the tpaML specification. An action description also specifies
handling of failures.
We discuss the main elements of an action definition using the following
Open Buying on the Internet (OBI) protocol buyer action definition. See
Section 6.2.3, A sample application TPA on page 212 for a short description
of the OBI protocol.
<Action>
<Request>
<RequestName>processOBIPOR</RequestName>
<RequestMessage>OBIPOR</RequestMessage>
<!--OBIPOR is a keyword which specifies the format of
the message, in this case a purchase order request-->
</Request>
<Response>
<ResponseName>handleOBIPO</ResponseName>
<ResponseMessage>OBIPO</ResponseMessage>
<ResponseServiceTime>
<ServiceTime>3600</ServiceTime>
<!-- 1-hour maximum time -->
</ResponseServiceTime>
</Response>
</Action>
The <Request> tag within the action section defines the name of an action, the
input information, and the result information. In the example above, the
request name is processOBIPOR, that is, the action transmits a purchase-order
request to the OBI buyer.
202
The XML Files: Using XML for B2B and B2C Applications
There is one <StartEnabled> tag for each party which can act as a server.
Only one of the actions whose names are specified under <StartEnabled>
may be invoked as the first action in a given conversation on that server.
203
Within each action definition, a sequencing rule specifies which actions can
no longer be invoked following the completion of the particular action, and
which actions become permissible following the particular action. The
specification is as follows:
<Sequencing>
<Enable> <!--actions permitted after this one-->
<RequestName>name_of_action</RequestName>
...
</Enable>
<Disable> <!--actions not permitted after this one-->
<RequestName>name_of_action</RequestName>
...
</Disable>
</Sequencing>
The <Enable> tag specifies which actions are permissible following the action
whose definition contains the <Sequencing> tag. The <Disable> tag specifies
which actions are no longer permitted after this action.
The rules in <Sequencing> are effective only if the action succeeded. If the
action did not succeed, the lists of actions allowed and not allowed are
unchanged.
204
The XML Files: Using XML for B2B and B2C Applications
B2
B1
B3
BPF
BPF
selling
purchasing
Backend
Systems
Backend
Systems
Figure 55. The control point role of BPF in inter-enterprise business processes
205
206
The XML Files: Using XML for B2B and B2C Applications
TPA
TPA
OBI Buyer..............
......Payment Gateway
OBI Seller
Seller-Supplier ......Remote Supplier
Service Provider ......Sub-contractor
......Service Provider
Agency
......Payment
Merchant
......
Consolidator
Besides providing the essential services for reliable and secure exchange of
documents between business partners based on their agreements, BPF
provides many other services to the applications for handling complex
interactions.
For example, consider a TPA between a buying organization and a selling
organization. The selling organization may initiate separate conversations,
based on separate TPAs, with each of its suppliers for handling service
requests from its clients. Not only does each conversation have to follow its
associated TPA, but also, there is also a need for coordination of multiple
conversations with different business partners under different TPAs. For
example, a service request (such as a Travel Plan) can be satisfied only if all
the sub-components can be obtained from different business partners (a
hotel, a rental car and so on). A BPF application can express such logic in a
simple manner. Each service request can be handled synchronously or
asynchronously, depending on the agreement level. An asynchronous
request may have response time constraints, and associated error handling
requirements upon time-out.
207
An important characteristic of BPF is that it does not require that all partners
to a given TPA must also use BPF. This independence is essential for doing
business over an open medium such as the Internet. One should not dictate
to others which technology to use to send and receive messages. Because
BPF is technology neutral, it is ideal for setting up loosely-coupled trading
agreements in which, for example, a business is free to replace suppliers by
others without having to make a large IT investment to support the new
supplier. As long as the business protocol, and hence the TPA, does not
fundamentally change, replacing business partners by others is practical.
The following sections provide a short overview of the basic BPF components
and the main data flows.
6.2.2.1 BPF components and data flow
The functionality provided by the Business-to-business Protocol Framework
is layered, as shown in Figure 57, in order to provide different levels of
abstraction for the business data flow. Furthermore, the layering, along with
well-defined inter-layer APIs, minimizes the spread of specialized code
across the framework. The business data flow through the layers, for any
particular type of business data, is driven by the Trading Partner Agreement
that governs that particular protocol.
208
The XML Files: Using XML for B2B and B2C Applications
Business logic
Web application programming environment
TPA
overall properties
roles
identification
communication properties
security properties
actions
error handling
commentary
sequencing checks
responsiveness checks
business logic interface
Document exchange
message data mapping
non-repudation
time-stamping
logging and audit
BPF Layering
Business protocol
Transport
network
security
The lowest level of the BPF stack is the Transport Layer, which contains
protocol-specific modules that allow the business processes to communicate
with the external world using any of the supported communication protocols,
with communication-related security like authentication and encryption. The
Transport Layer interfaces with the Document Exchange layer, which
supports the abstraction of a business document (for example, an EDI
document).
The Document exchange layer provides common document-related
functionality such as message data mapping, non-repudiation, time-stamping,
logging, and audit-trail. The Document exchange layer interfaces with the
Business Protocol layer, which provides document-type and trading-partner
specific data handling functionality. The Business Protocol layer, in turn,
provides the business-logic interface.
The BPF components can be broadly categorized as those related to setting
up the BPF environment and those related to runtime operations for business
209
Local Processes
(a)
XML
Registration
Database
Authoring Tool
(c)
Workflow
ERP
packages
Business
Applicaiton
Generation Tool
Application
Interfaces
Executable Files
Parsers
Security
Handlers
Interface Code
Registration Tools
Document
Repository
Rules Code
(b)
Encoders
Document
Exchanget
Logging
BPF Manager
HTTPS
Transport
SMTP
Run Time
MQSeries
Network
EDI
Runtime
Services
INbound request/replies
Network
Sub
Contractors
OUTbound request/replies
Concerning the first category, BPF includes a suite of tools to support the
TPA life cycle, including preparation, setup, and generation of new TPA
documents and the generation of interaction processing from them:
Authoring tools assist the creation of new TPAs. In many cases, it may be
convenient to construct a new TPA by combining elements from those
previously deployed, tailoring the result for the new target interaction. The
authoring tools for TPA include modelling and template functions to
simplify TPA assembly from pre-existing parts.
Registration tools are used to populate a registration database with
interface information identifying the user application logic to be bound into
210
The XML Files: Using XML for B2B and B2C Applications
211
212
The XML Files: Using XML for B2B and B2C Applications
Requisitioner
View
Purchasing Homepage
Buying
Organization
Query Status
Catalog
Browsing
t
ues
q
e
R
O
PO
ed P
t
e
l
p
Com
Invoice
Selling
Organization
Check
Payment
Payment
Authority
213
214
The XML Files: Using XML for B2B and B2C Applications
Requisitioner
Selling
Organization
2. Redirected to
preferred supplier
catalog
1. Login
Catalog and
purchasing functions
Buying
Organization
Business-ToBusiness Manager
Request PO
l PO
Partia
Application
Logic
TPA
Object
d PO
plete
Com
4. Request
Approval
4'. Confirm
Gateway
5.
m
Co
et
pl
ed
PO
Partial PO
TPA
Object
Gateway
Completed PO
Gateway
Local Processes
3. Partial PO
Business-ToBusiness Manager
Local
Processes
The process starts when a requisitioner contacts (1) the buyer server via a
browser and is redirected (2) to the URL for the seller server. The
requisitioner is shown the supplier catalog appropriate to the requisitioner's
organization.
When the requisitioner makes a selection, the request is communicated to
the TPA object. The TPA object communicates the purchase request to the
local business processes via one of the gateways shown at the far right in the
figure. A partial purchase order is returned to the TPA object via the gateway.
The TPA object then issues the processOBIPOR action request (3) to the buyer
server, sending a partial purchase order to the buyer server.
This request arrives at the buyer's TPA object, which evaluates the rules
defined in the TPA and then sends the partial purchase order to the buyer
application logic. In processing the partial purchase order, the application
logic communicates with local business processes, via the gateway shown at
the lower left in the figure, to request approval (4) of the purchase order.
215
If the purchase is approved (4'), the approval arrives at the application logic,
which completes the purchase order and passes the completed purchase
order to the buyer's TPA object. The TPA object then issues the callback (5),
sending the completed purchase order back to the seller.
The completed purchase order arrives at the seller's TPA object, which
passes it to the local processes via the gateway at the lower right. The local
processes handle fulfillment (for example, shipping) and invoicing/payment.
They also initiate a confirmation message to be returned to the requisitioner
via the browser (not shown in Figure 60).
In the following section we will build an OBI TPA XML document which
defines the OBI between two specific companies: Large Co, which plays the
buyer role, and Pens Are We, which plays the seller role, as proposed in the
tpaML specification document.
To construct this particular TPA we will use IBM XML Visual Builder tool which
is, as described in Section 3.2.3.3, Visual XML tools on page 69, an early
technology release for providing XML tooling in the IBM Application
Framework for e-Business and can be downloaded from IBM AlphaWorks site
( http://www.alphaworks.ibm.com).
6.2.4 Using the IBM Visual XML Builder for a specific OBI TPA
The IBM Visual XML Builder is a tool for constructing valid XML documents
from a DTD, and can be effectively used to build Trading Partner
Agreements. In general, by using the IBM Visual XML Builder, you can:
Create an XML model that conforms to a DTD.
Customize the XML model to add in additional semantic information such
as the data types of a field or default values of a field.
Define user-exits for specifying application specific processing logic.
Support re-use of other XML models.
Validate an XML document based on the DTD or additional semantic
information.
Generate the final XML document.
An important feature of the IBM Visual XML Builder is concerned with the
ability to promote the separation of roles and responsibilities in a large
organization. In particular, the tool can be used by people creating an XML
structure from scratch using a DTD, or it can be used by people customizing
an existing XML template/model by simply filling in the values. Different
216
The XML Files: Using XML for B2B and B2C Applications
services will be available to the user depending on what mode the tool is
invoked in.
This last feature is particular useful in the context of the TPA building process
since it is possible to foresee that within an organization/company there are
separate responsibilities and roles to define and handle TPAs. It is possible to
have separate roles and responsibilities which include the TPA XML model
developing process and the TPA XML document building process with a
specific partner. In the first case, a general TPA XML model can include some
types of relationships within a partner, such as a buyer to supplier, and some
business protocol. In the second case, a TPA model is customized to match
the agreements in place with a particular partner.
6.2.4.1 Getting started with the IBM XML Visual Builder
Each tool in the IBM XML Tools package operates through models. A model
encapsulates the tool state, or what is commonly known as meta-data,
concerning the particular object produced by that tool (a DTD, an XML, and
so on). For example, as a first step for creating an XML document, it is
necessary to have a model of the XML document that has to be created. An
XML model, for instance, contains additional meta-data that are not captured
by a DTD and are used by the Visual tool. An XML model is created from a
specific DTD. A DTD model has a .dtd.xmi extension. An XML model has an
.xml.xmi extension. IBM XML Tools use the undergoing XMI standard format
to externalize each tool's meta-model.
This operational approach of the IBM XML tools influences positively the TPA
building process. In particular, to build a specific TPA XML document by
using the IBM XML Visual Builder, these steps must be followed:
1. Generate a General TPA XML model (if not available) starting from the
tpaML specification DTD document. This model can be generated by
using, for example, the IBM Visual DTD tool also included in the package
or the specific wizard also included in the IBM XML Visual Builder tool.
2. Customize the General TPA XML model by building a specialized model,
the TPA XML model, which encapsulates the structure of the particular
TPA XML document that has to be built. The TPA XML model can also
include other sub-models (2a), define tags default values, and define
user-exits on tag attributes values for specifying an external application
specific processing logic that can be activated during the generation of
XML documents from that model (2b). The external processing logic
determines on-the-fly the particular tag attribute value to be set when the
XML document is generated.
217
3. Edit and generate a valid TPA XML document by using the TPA XML
model built and customized in step 2.
Figure 61 shows, schematically, the various products generated during the
TPA XML document building process within the IBM XML Visual Builder tool
environment.
2a.
1.
2b.
2c.
External
Processing Logic
Figure 61. TPA XML document building process within IBM Visual XML Builder
Figure 62 shows the wizard window that IBM Visual Builder tool presents to
the user when it is asked to create a new XML model. The figure proposes, in
particular, a moment at the beginning of step 2, where we are building the
specialized TPA model that will encapsulate the structure of the contract
between our two companies: Large Co and Pens We Are. We defined, in
particular, the TPA model name ( C:\IBMXMLTools\xmimodels\OBI.xml.xmi) and
specified to be used the general TPA XML model ( tpa.dtd.xmi) we built
starting from the tpaML DTD specification during step 1.
218
The XML Files: Using XML for B2B and B2C Applications
Figure 62. Creating a TPA XML model for the OBI TPA contract
By pushing the Next>> button on the window shown in Figure 62, Visual XML
Builder requires the user to specify the root element of the XML document
that has to be built (see Figure 63). All elements available in the tpaML.DTD
specification can be selected. For building a TPA XML model, the TPA
element has to be selected.
Another important feature of XML Visual Builder is that by getting a
sub-element from an existing TPA model (for example, Address,
Communication, and so on), another TPA model can be built using that
sub-element as a new root. As we will show in the following sections, we can
build models for each sub-part of a TPA contract (that is, sub-models; see
step 2b above) and after this, insert/include all sub-parts into a general TPA
XML model.
219
Figure 64 shows the IBM XML Visual Builder main window after the specific
TPA XML model creation process, which reflects the fact that the OBI TPA
structure for our contract is completed (step 2a). On the left side of the
window, a tree view is displayed which shows a document structure reflecting
the basic tpaML.dtd encapsulated in the General TPA XML model.
We are now ready to use the editing facility provided by IBM XML Visual
Builder tool to customize the specific TPA XML model for building an
OBI-based TPA model that will supply the skeleton of the XML document
(contract) between our two companies. In particular, we will customize the
model according to our requirements by deleting unnecessary optional tags
and/or duplicating tags into the model.
220
The XML Files: Using XML for B2B and B2C Applications
221
In the next section we will refine the TPA XML model by adding further
meta-data that are handled by the IBM XML Visual Builder which can help in
composing and generating the final TPA XML document.
Contract general information:
Start:
End:
Number of invocations:
Number of concurrent conversations:
Conversation Life:
01/01/1999, 00:00:00
01/01/2001, 00:00:00
100000
1
86400s
Buyer details:
Large Co
Tel. 914-945-3000
Address: Large Co
HQ Building
1 Main Street
SmallTown
NY
10000
USA
Address for billing:
Large Co
Accounting Department
100 Bean Counters Road
Any City
CT
06000
USA
Address for shipping
Large Co
Procurement Department
99 Purchase Road
Buy City
NY
10001
USA
Primary contact:
Smith L. John
Senior Buyer
Tel. 914-111-6789
Tel. 914-111-6790
email: jjsmith@largeco.com
email: http://www.largeco.com/procurement/jsmith.html
fax: 914-111-6780
Secondary Contact:
222
The XML Files: Using XML for B2B and B2C Applications
Blow J. Joe
Buyer
Tel. 914-111-6722
Tel. 914-111-6725
email: jblow@largeco.com
fax: 914-111-6780
Seller details:
Pens Are We
Tel. 945-123-1000
Address: Pens Are We
Building 001
123 High Street
EarthQuake City
CA
94567
USA
Contact: Doe E. Jane
Vice President of Internet Sales
Tel. 945-123-4567
Tel. 945-123-4570
email: janedoe@pensarewe.com
email: http://www.pensarewe.com/sales/jdoe.html
fax: 945-123-9999
Arbitrator details:
XYZArbitrator
Tel. 780-333-1111
Address: XYZArbitrator
Suite 3
77 Lawyers Blvd
ABC City
MA
01234
USA
Contact: Mr. Black K. Joe
Tel. 780-333-4040
Tel. 780-333-4045
email: jblack@xyzarbitrator.com
email: http://www.xyzarbitrator.com/jblack.html
fax: 780-333-5000
Figure 65 shows the proposed TPAinfo section of the TPA XML model for
coding the general information layer between Large Co and Pens We Are. As
you can see from this figure, the initial TPA XML model has been simplified by
deleting, in some cases, unnecessary elements (for example, the Role and
223
Figure 65. TPAInfo section of the TPA XML model for the two companies
Transport layer:
Type of transport layer: HTTPS
First HTTP node
Party Name LargeCo
URL
URLName:
requestURL
224
The XML Files: Using XML for B2B and B2C Applications
Address:
https://www.largeco.com/jackal/servlet/OBIBuy
Security:
Encryption
Protocol:
SSL
Version
3.0
Certificate:
X509.V3
KeyLength:
1024
Party Name:
LargeCo
Issuer Name:
VeriSign, Inc.
Issuer Certificate Source: http://www.verisign.com/certs
Party Name:
PensAreWe
Issuer Name:
GTE, Inc.
Issuer Certificate Source: http://www.gte.com/certs
Authentication
Protocol:
SSL
Version:
3.0
Certificate:
X509.V3
KeyLength:
1024
Party Name:
LargeCo
Issuer Name:
VeriSign, Inc.
Issuer Certificate Source: http://www.verisign.com/certs
Party Name:
PensAreWe
Issuer Name:
GTE, Inc.
Issuer Certificate Source: http://www.gte.com/certs
Figure 66 shows the proposed Transport section of the TPA XML model for
coding the Transport and Security layer between Large Co and Pens We Are.
Also, as you can see from this figure, the initial TPA XML model has been
simplified by deleting, in some cases, unnecessary elements (for example,
225
Figure 66. Transport section of the TPA XML model for the two companies
MessageSecurity
Type:
Protocol:
226
Non Repudiation
Digital Signature
The XML Files: Using XML for B2B and B2C Applications
Hash Function: M
D5
Encryption Algorithm:RSA
Signature Algorithm: DSA
Certificate Type:
X509.V3
Key Length:
1024
Party Name:
LargeCo
Issuer Name:
VeriSign, Inc.
Issuer Certificate Source: http://www.verisign.com/certs
Party Name:
PensAreWe
Issuer Name:
GTE, Inc.
Issuer Certificate Source: http://www.gte.com/certs
Figure 67 shows the proposed DocExchange section of the TPA XML model
for coding the Document exchange layer between Large Co and Pens We
Are. Also, as you can see from this figure, the initial TPA XML model has
been simplified by deleting, in some cases, unnecessary elements (for
example, the Digital Envelope tag in the Message Security tag), and by
duplicating elements when needed in other cases. We also added a new
Party element in the Certificate section.
227
Figure 67. Document Exchange of TPA XML model for the two companies
putOPOR
OBIPOR
getOPO
OBIPO
228
The XML Files: Using XML for B2B and B2C Applications
Name:
Message:
shop
shopMessage
Name:
Message:
putOPO
OBIPO
229
Figure 68. Service Interface section of TPA XML model for the two companies
230
The XML Files: Using XML for B2B and B2C Applications
231
Figure 69 shows that in the TPA XML model, we have associated to the
Date element in the Start contract section, some meta-data information
the Date Type, in this case.
Figure 70 shows the usage of the user-exit facility supplied by IBM XML
Visual Builder. Users can add to the tool specific plug-in mechanisms,
encapsulated into JAVA classes, for generating specific field values. User-exit
functions will be called before the actual XML document is generated. In the
case of TPA, IBM XML Visual Builder supplies a specific JAVA class
( com.ibm.b2b.vxml.tpa.TPAMemberId) which calculates automatically the
MemberId field value when the final TPA XML document will be generated.
Additionally, in the IdCodeType field, we put the special value ZZ and defined
it in the tpaML specification which denotes any mutually agreed identifier. In
this case, the identifiers are defined by the parties for the purpose of the TPA,
but do not come from any industry-standard registry, such us the Dun and
Bradstreet registry.
232
The XML Files: Using XML for B2B and B2C Applications
Figure 70. Using the user-exit function in IBM XML Visual Builder environment
233
Figure 71. Group editing facility of the IBM XML Visual Builder environment
Figure 72 shows another editing facility supplied by IBM XML Visual Builder,
in this case for filling the Date type fields: it is possible to use a specialized
calendar editing window.
234
The XML Files: Using XML for B2B and B2C Applications
Figure 72. Calendar editing facility of the IBM XML Visual Builder environment
Once all fields have been filled in, we can generate and validate the final TPA
XML document. Figure 73 shows a portion of the OBI TPA XML source
document. Appendix A, An example of a OBI TPA XML document on page
281, lists the full OBI TPA XML document.
235
6.3 Summary
In this chapter, we have given an overview of the role that XML can play in
the business-to-business application context, as well as what IBM is doing in
helping companies in this particular field.
B2B applications have been positioned as one of the best opportunities of the
emerging business integration IT field in the inter-enterprise e-business
application area.
Two key IBM technologies, recently introduced, that can support the B2B
business models have been extensively described: the standard language
proposal tpaML and the Business-to-business Protocol Framework (BPF).
236
The XML Files: Using XML for B2B and B2C Applications
These technologies are the basic building blocks of IBM WebSphere B2B
Integrator, the B2B XML-based framework announced by IBM.
tpaML is the standard mark-up language proposed by IBM for writing Trading
Partner Agreements (TPAs). A TPA is an XML document that contains the
general contract terms and conditions, participant roles (buyers, sellers),
communication and security protocols and business processes, (valid
actions, sequencing rules, etc.). TPA documents capture the essential
information upon which trading partners must agree in order for their
applications and business processes to communicate.
BPF provides a comprehensive set of tools and enablers for ease of
specification, configuration, plug-in, customization, and execution of a set of
TPAs between business partners. It is the gateway, coordinator, and control
point of choice across inter-enterprise processes. Examples of usage of TPA
and TPA authoring tools have been also provided.
237
238
The XML Files: Using XML for B2B and B2C Applications
239
240
The XML Files: Using XML for B2B and B2C Applications
Chapter 7.
241
242
The XML Files: Using XML for B2B and B2C Applications
243
Buyer
Buyer
Directories
Auctions
Added value services
MarketPlace
Business Models
Buyer
B2B
intermediary
Exchanges
Aggregations
Seller
Seller
Seller
Figure 74. The eMarketPlace and the online intermediary business models
In the following section, we revise some typical business models which are
adopted by B2B online intermediaries.
244
The XML Files: Using XML for B2B and B2C Applications
Auctions
Auctions provide mechanisms which temporary match buyers and sellers
and prices to levels of supply and demand. Auction services are typically
delivered as: Bulletin boards (sellers post offers and buyers bid on these
offers the bidding period is not defined: offers and bid are valid until are
removed from the bulletin board and bidders are not aware of other
peoples bids), Reverse auctions (traditional auction mechanism in which
buyers post requests to purchase in a structured format, and sellers to bid
for supply of the goods or services), Regular auctions (traditional auction
mechanism in which sellers post an offer and buyers to bid on this).
Exchange
This model allows both buyers and sellers to make bids and offers for
some underlying commodity. These exchanges replicate what has been
developed in industry specific financial exchanges and in the physical
market (buyers, trade houses, exporters, producers). Differently from
auctions, offers can be made at any time and can often be withdrawn or
revised.
Aggregation
In this intermediary business model intermediaries play an active role by
aggregating requests coming from the various parties. In particular, we
can distinguish the aggregation model into three forms:
245
246
The XML Files: Using XML for B2B and B2C Applications
247
Buyer
Buyer
Buyer
Internet
B2B Directory
Service
Aggregations
Aucions
E-broker
other eMarketPlaces
eMarket Information
Portal
Customer support
E-broker partners
(banks, logistic,
etc.)
services
Seller
Seller
Seller
248
The XML Files: Using XML for B2B and B2C Applications
249
1. Subscription
Req.
E-broker
2. Subscription Req.
Directory
Service
3. Confirm Subscription
Adminstrator
Party Profile
4. Confirm
Subscription
Trader
5. Profile
Update
Identification
name
Business
segment
catalogue
5. Profile Update
Business Profile
standard TPA
accepted
standard
conditions
accepted
Party
Profiles
Figure 76. Interactions between Traders and the E-broker Directory Service
Figure 77 shows interactions that are activated during the online building
process of new TPAs. A trader (Trader A in the figure) connects to the
E-broker Directory service and query the trading partners repository
(1 and 2). Once a trading partner (the Trading Partner B in the figure) is
found, the trader starts to compose the new TPA by using information coming
from its business profile, from the candidate trading partner business profile
and from the TPA standard repository handled centrally by E-broker (3). Once
the new TPA is finished, the trader can download it (the XML document or a
TPA runtime version) (4) and start a B2B transaction with the new trading
partner (5).
250
The XML Files: Using XML for B2B and B2C Applications
Directory
Service:
remote TPA
autoring tool
1. Browsing
Directory and
selectiong
partners
2. Query
E-broker
Standard TPA
4. Download
TPA
3. Composing
a new TPA
Party
Profiles
Business Profile
Trader A
5. B2B Transaction
Trader A
Standard
TPA repository
Business Profile
Trader B
Trading Partner B
Auctions
E-broker supplies a set of auction mechanisms. In particular, all three
basic auction modalities reviewed in Section 7.3.1, E-broker business
models on page 247 are provided.
Auction services are delivered through any of the following:
- A bulletin board service where sellers can post offers, and buyers can
bid on these offers. The bidding period is not defined: offers and bids
are valid until they are removed from the bulletin board, and bidders
are not aware of other peoples bids.
- A reverse auctions service where buyers can post requests to
purchase in a structured and controlled format, and sellers will bid for
supply of the goods or services.
251
- Regular auctions service where sellers can post an offer and buyers
can bid on it.
E-broker plays an active role in the auction process. Buyers and sellers
have to sign specific Trading Partner Agreements with E-broker and
submit bids or offers by appropriately connecting their IT infrastructures
with the E-broker IT infrastructure according to the TPA. Also, in this case,
E-broker provides advanced TPA authoring tools (wizards) that will be
used by the parties that would have access to the auctions.
Evidently, the usage of TPA supplies a means to fully automatize the
entire Offer-Bid auction cycle.
Figure 78 shows a typical information flow that is set up for the bulletin
board auction mechanism. Sellers (labeled Seller in the figure) post offers
on the bulletin board (1), and these remain on the bulletin board until a
specific (6) remove action is invoked. E-broker, eventually, can invite
interested buyers to formulate bids (2). Buyers (labeled Buyer in the
figure) can browse and post bids for the offers currently opened (3),
asking for offer details in the case the offer is accepted (4). Once offer
details are received from the buyer, a B2B transaction is activated and
completed between the parties (5). At the end of the transaction, the seller
can require the buyer to remove the Offer from the bulletin board (6).
252
The XML Files: Using XML for B2B and B2C Applications
E-broker
Open Offers
......................
......................
......................
......................
......................
1. Post an
Offer on the
Bulleting
Board
Auctions:
Bullettin
Board
6. Remove
an Offer
4. Receive
Offer Details
Seller
5. B2B Transaction
3. Browse and/or
trig open offers
and Bid specific
offers
Buyer
253
E-broker
Requests of
Purchase
......................
......................
......................
......................
......................
1. Post a
request to
purchase
Reverse
Auctions
3. Bid specific
requests
4. Bid
Accepted
Buyer
5. B2B Transaction
Seller
Figure 80 shows the typical information flow of the last auction modality
supported by E-broker: regular auctions. This modality is similar to the
previous one, with seller and buyer roles interchanged. In this case,
sellers (labeled Seller in the figure) post offers to the E-broker auction
service (1), which organizes auctions on these offers by temporary inviting
interested buyers (labeled Buyer in the figure) to formulate bids (2).
Buyers post bids on the offer, and once a bid is accepted, this is officially
acknowledged to the buyer (4), who can activate a B2B transaction with
the seller (5).
254
The XML Files: Using XML for B2B and B2C Applications
E-broker
Offers
......................
......................
......................
......................
......................
Regular
Auctions
1. Post Offers
3. Bid specific
Offers
4. Bid
Accepted
Seller
5. B2B Transaction
Buyer
255
to send an RFQ to all sellers, for a specific good and/or service, by directly
interfacing the IT E-broker infrastructure. As usual, this service will
supplied on the basis of Trading Partner Agreements that parties will
subscribe with E-broker.
Figure 81 shows one of the possible aggregation services supplied by
E-broker. In this case, a buyer (labeled Buyer in the figure) sends a
multiple Request For Quote (RFQ) to the aggregation service of E-broker
for specific goods or services present in the centralized catalogue (1).
E-broker forwards the RFQ to all sellers who sell the object of the request
(2) and collects all Quotation responses (3) which are returned to the
buyer (4) who, finally, can activate a B2B transaction with the seller (5).
The E-brokers value-added, in this case, lies in the ability to appropriately
aggregate sellers catalogues, and to recognize and qualify, for a given
RFQ, the sellers that are able to supply the requested goods and/or
services.
E-broker
2. Req. for RFQ
Aggregation
Service
4. Quotaion
responses
1. Browse the
centralized catalogue
and send RFQ
Buyer
3. Quotaion
response
5. B2B Transaction
256
The XML Files: Using XML for B2B and B2C Applications
Seller
257
For example, the Platform for Privacy Preferences Project (P3P) developed
by W3C, provides a general framework for informed online interactions. The
goal of P3P is to enable users to exercise preferences over Web sites'
privacy practices. P3P applications will allow users to be informed about Web
site practices, delegate decisions to their computer agent when they wish,
and tailor relationships with specific sites.
The Directory Services Markup Language (DSML, www.dsml.org) is a new
proposal by several industrial companies (and IBM) for representing directory
service information (that is store, for example, in LDAP servers) in XML
format. DSML would provide this directory information to XML-based
applications in their native environment and data format. This would allow for
the E-broker applications to retrieve company, product, service and customer
data over the Internet described in a standard format, DSML.
As another example, the Customer Profile Exchange (CPEX) initiative is an
industry organization dedicated to developing an open standard to facilitate
the exchange of privacy-enabled customer information across enterprise
applications. The CPEX standard integrates online and offline customer data
in an XML-based data model for use within various enterprise applications
both on and off the Web.
258
The XML Files: Using XML for B2B and B2C Applications
259
and access the information. Document type definitions can help in automatic
categorization of documents, and queries and indexing can be built based on
this information.
XML also allows more complex queries than conventional database
technology. XML query standards and tools are still in development phase,
but it is expected that they could bring powerful solutions to the E-broker
architecture.
XML translators can transform documents between different XML
vocabularies. This allows automatic conversions between business document
models used by different traders and the E-broker. The XSLT specification
describes how to transform one XML document into another, and an XML
vocabulary specifies formatting semantics. Tools based upon this technology
can automate tasks during the acquisition of business data from companies.
260
The XML Files: Using XML for B2B and B2C Applications
261
Community
Traders
E-broker
Partners
Internet
E-broker
Security
Access
Manager
Customer Support
Services
B2B Integration
Middleware
eMarketPlace
Information Portal
B2B Directory
Service
Contracts
Manager
Auctions
Service
Aggregation
Service
Basic
infrastructure
layer
B2C service
layer
B2B online
service layer
262
The XML Files: Using XML for B2B and B2C Applications
263
264
The XML Files: Using XML for B2B and B2C Applications
Client
E-broker tier
async/sync
Web Client
Directory
Service
Auction service
Figure 84 shows the application topology diagram for the E-broker auction
service. The auction service is based on the Jointly Managed three-tier
B2B pattern. Traders interact with the E-broker by using executable
contracts which encode all business integration services related to the
auction processes. There are three kind of contracts that model the
interaction process between trader (buyer and seller) IT infrastructures
and the E-broker; one for each type of auction modality, although in the
figure, just a generic Auction Contract is shown. Contracts describe a set
of services that are available on both trader-side and on the E-broker-side.
E-broker auction services are arranged on an intermediary tier which is
connected with a back-end application that manages all auction services.
Connections between tiers can be synchronous or asynchronous.
265
Trader A
Auction
Executable
Contract
E-broker tier
Auction
Executable
Contract
Auction
Services
Trader B
Auction
Services
Auction
manager
Trader App
Auction
Services
1:N
sync
Auction
Executable
Contract
Auction
Executable
Contract
Auction
Services
N:1
sync
N:M
async
mutually agreed
msgs
Trader App
266
The XML Files: Using XML for B2B and B2C Applications
E-broker tier
Partner A
Buyer
App
N:1
async
mutually agreed
msgs
Aggregation
Executable
Contract
1:N
sync
Partner B
Post an
RFQ
N:M
async server-specified
msgs / sync
Aggregation
manager
1:N
sync
Aggregation
Executable
Contract
Aggregation
Executable
Contract
N:M
async
mutually agreed
msgs
N:1
sync
Aggregation
Services
1:N
sync
Seller
App
267
Client
E-broker tier
async/sync
Web Client
Customer
Support
Services
eMarketPlace
Information
Portal
268
The XML Files: Using XML for B2B and B2C Applications
Trader
E-broker tier
Aggregation
Executable
Contract
Auction
Executable
Contract
Aggregation
Executable
Contract
Auction
Executable
Contract
Aggregation
Services
Auction
Services
Aggregation
Services
Auction
Services
Auction
manager
Aggregation
manager
1:N
sync
Trader App
N:1
sync
N:M
async
mutually agreed
msgs
Directory
Service
Web Client
Customer
Support
Services
eMarketPlace
Information
Portal
269
Auction &
Aggregation
manager
and data
Directory
and
Security
Services
B2B
middleware
manger
Web
application
server
Protocol Firewall
Existing
applications
and data
Domain Firewall
internal network
Domain name
server
Web
Client
internal network
T
NE
ER
T
IN
Web
application
server
Web
application
server
Domain Firewall
Protocol Firewall
Trader
Directory
and
Security
Services
B2B
middleware
manger
Back-end
Customer
Support and
eMIP App
Auction &
Aggregation
manager
and data
E-Broker
Figure 88. Runtime topology of E-broker
270
Nodes
Products
The XML Files: Using XML for B2B and B2C Applications
Nodes
Products
Non-applicable
B2B Services
Specific Development
SecureWay Directory
secureWay Firewall
eNetworkFirewall 3.2
User
Web Browser
271
We describe the Business Protocol layer of each TPA, laying out details
concerning other TPA layers.
Bulletin board auction
E-broker services with the Seller acting as a client
Actions
Action 1.
Request Name:
postOffer
Request Message: postOfferMessage
Enable:
removeOffer
Action 2.
Request Name:
removeOffer
Request Message: removeOfferMessage
Response Name:
confirmOfferDeletion
Response Message: confirmOfferDeletionMessage
Start Enabled Actions
RequestName: postOffer
E-broker services with the Buyer acting as a client
Actions
Action 1.
Request Name:
postABid
Request Message: postAMessage
Response Name:
offerrDetails
Response Message: offerrDetailsMessage
Action 2.
Request Name:
requestNewOffers
Request Message: requestNewOffersMessage
Response Name:
newOffers
Response Message: newOffersMessage
Start Enabled Actions
RequestName: requestNewOffers
Buyer services with the E-broker acting as a client
Actions
Action 1.
272
The XML Files: Using XML for B2B and B2C Applications
Request Name:
requestForABid
Request Message: requestForBidAMessage
Start Enabled Actions
RequestName: requestForBid
Regular auction
E-broker services with the Seller acting as a client
Actions
Action 1.
Request Name:
postOffer
Request Message: postOfferMessage
E-broker services with the Buyer acting as a client
Actions
Action 1.
Request Name:
postABid
Request Message: postAMessage
Response Name:
offerrDetails
Response Message: offerrDetailsMessage
Buyer services with the E-broker acting as a client
Actions
Action 1.
Request Name:
requestForABid
Request Message: requestForBidAMessage
Seller services with the Buyer acting as a client
Actions
Action 1.
Request Name:
purchaseOrder
Request Message: purchaseOrderMessage
Reverse auction
E-broker services with the Buyer acting as a client
Actions
Action 1.
Request Name:
postRequestOfPurchase
Request Message: postRequestOfPurchaseMessage
E-broker services with the Seller acting as a client
273
Actions
Action 1.
Request Name:
Request Message:
Response Name:
Response Message:
postABid
postAMessage
requestOfPurchaseDetails
requestOfPurchaseDetailsMessage
Aggregation Service
E-broker services with the Buyer acting as a client
Actions
Action 1.
Request Name:
postAMultipleRFQ
Request Message: postAMultipleRFQMessage
Response Name:
QuotationsDetails
Response Message: QuotationsDetailsMessage
Seller services with the E-broker acting as a client
Actions
Action 1.
Request Name:
RFQ
Request Message: RFQMessage
Response Name:
QuotationDetails
Response Message: QuotationDetailsMessage
Seller services with the Buyer acting as a client
Actions
Action 1.
Request Name:
purchaseOrder
Request Message: purchaseOrderMessage
274
The XML Files: Using XML for B2B and B2C Applications
The next DTD describes a companys TPA collection and usual TPA subparts:
<!ELEMENT BusinessProfile (TPASubparts,TPACollection)>
<!ENTITY % TPA SYSTEM "c:\db2\xml\samples\ebroker\tpa.dtd">
<!ELEMENT TPASubparts (TPA)+>
<!ELEMENT TPACollection (TPA)+>
%TPA;
275
Company data can be described in XML format using these DTDs. The
following listing shows the first part of a simple company XML file:
<?xml version='1.0'?>
<!DOCTYPE Company SYSTEM "C:\db2\xml\samples\ebroker\eb_com.dtd">
<Company identifier="a0">
<CompanyInfo>
<CompanyName>
<FullName>Almaden Mining Co.</FullName>
<ShortName>AMC</ShortName>
<ShortName>AlMine</ShortName>
</CompanyName>
<CompanyAbout>This is a sample company for E-broker</CompanyAbout>
<ContactPerson>
<PersonName>Mr. Pres Ident</PersonName>
<EMail Type="primary">president@amc.com</EMail>
<EMail Type="secondary">pre@mail.com</EMail>
<ContactInfo>President of AMC</ContactInfo>
</ContactPerson>
<Location>
<Street>203 Almaden Expressway</Street>
<City>San Jose</City>
<State>CA</State>
<Country>US</Country>
<ZIP>95120</ZIP>
</Location>
<InternetLocation>
<WebAddress>http://www.amc.com</WebAddress>
<EMail Type="primary">mail@amc.co</EMail>
</InternetLocation>
</CompanyInfo>
<BusinessProfile>
<TPASubparts>
<TPA>
...
</TPA>
</TPASubparts>
<TPACollection>
<TPA>
...
</TPA>
<TPA>
...
</TPA>
</TPACollection>
</BusinessProfile>
</Company>
276
The XML Files: Using XML for B2B and B2C Applications
To store XML files in DB2 Universal Database, we utilize the XML Extender
interface. We developed a simple database model that reflects the
information described in these DTDs. This model is the EB_DB database
(Figure 89).
company_tab
company information
name
address
contact persons
...
tpa_side_tab
tpa_tab
TPA information
complete TPAs
TPA elements
The EB_DB has three main tables to describe companies and their TPAs.
The company_tab contains basic information about a company. This
information is defined by the com_info.dtd. This table contains data in a
database-centered way that helps in using this information for non-XML
applications. The tpa_tab table contains complete TPA documents (XML
documents), while the tpa_side_tab contains some elements from TPA
documents.
To establish the mapping between the XML data and database entries, we
specified document access definition (DAD) files. There are two different
ways of storing XML data in DB2 using the XML Extender: we can store
complete XML files, or we can associate database elements with XML data.
Basic information about a company could also be useful for other
applications, therefore we store this data in database columns in the
company_tab table, and compose the XML files from these tables. This is
called an XML collection. XML collections are useful when the data is
accessed both using XML and database techniques, and it is stored in
several database tables.
277
TPAs, on the other hand, are used as entities, and can be stored intact in
DB2 tables. This is the XML column storage method. XML columns work well
for archiving XML documents. Elements and attributes of these XML
documents can also be mapped to database tables (so called side tables) to
help indexing and structural search. We defined a tpa_side_tab table for this
purpose.
To set up the DB2 XML Extender, we followed the steps described in the DB2
XML Extender Administration and Programming guide (Version 7), Chapter 2,
Getting started with XML Extender.
The following sample shows a part of the DAD file that describes the relation
between XML documents based on com_info.dtd and database table
company_tab.
<?xml version="1.0"?>
<!DOCTYPE DAD SYSTEM "c:\db2/xml/dtd/dad.dtd">
<DAD>
<validation>NO</validation>
<Xcollection>
<SQL_stmt>SELECT company_name, key FROM company_tab</SQL_stmt>
<prolog>?xml version="1.0"?</prolog>
<doctype>!DOCTYPE CompanyInfo SYSTEM
"c:\db2\xml\samples\ebroker\com_info.dtd"
</doctype>
<root_node>
<element_node name="CompanyInfo">
<attribute_node name="key">
<column name="key"/>
</attribute_node>
<element_node name="CompanyName">
<element_node name="FullName">
<text_node><colum name="CompanyName"/></text_node>
</element_node>
...
</element_node>
...
</element_node>
</root_node>
</XCollection>
</DAD>
The following DAD file describes the relation between TPA elements and the
tpa_side_tab table.
278
The XML Files: Using XML for B2B and B2C Applications
<?xml version="1.0"?>
<!DOCTYPE DAD SYSTEM "c:\db2/xml/dtd/dad.dtd">
<DAD>
<dtdid>c:\db2/xml/samples/ebroker/tpa.dtd</dtdid>
<validation>YES</validation>
<Xcolumn>
<table name="tpa_side_tab">
<column name="tpa_party"
type="varchar(80)"
path="/TPA/TPAInfo/Participants/Member/PartyName"
multi_occurence="NO"/>
</table>
</Xcolumn>
</DAD>
7.5 Summary
In this chapter we presented a short overview of the B2B eMarketPlace
intermediation field and outlined a new project case study, called E-broker, in
this particular domain. We selected the B2B eMarketPlace intermediation
field since it encompasses and, at the same time, extends all traditional B2B
(but also B2C) related issues.
B2B eMarketPlace applications offer many interesting aspects to analyze and
discuss from both the project and the design point of view, as well as what
affects the role that XML plays in these types of systems. In particular, this
type of application helps you understand in practical terms many more
elements in applying XML than simply analyzing a traditional B2B or B2C
application example. B2B eMarketPlace intermediaries are strongly emerging
in the B2B market to complement and empower the traditional B2B model
centered around the buyer-seller transaction paradigm. B2B eMarketPlace
intermediaries mediate among buyers and sellers by facilitating the business
transaction process and, in some cases, by supplying value-added function to
the business transaction chain.
The chapter ends with the description of some design activities of the
E-broker project.
279
280
The XML Files: Using XML for B2B and B2C Applications
281
<AddressLine>
1 Main Street
</AddressLine>
<City>
SmallTown
</City>
<State>
NY
</State>
<Zip>
10000
</Zip>
<Country>
USA
</Country>
</Address>
<Address>
<AddressType>
billing
</AddressType>
<AddressLine>
Large Co
</AddressLine>
<AddressLine>
Accounting Department
</AddressLine>
<AddressLine>
100 Bean Counters Road
</AddressLine>
<City>
Any City
</City>
<State>
CT
</State>
<Zip>
06000
</Zip>
<Country>
USA
</Country>
</Address>
<Address>
<AddressType>
shipping
</AddressType>
<AddressLine>
282
The XML Files: Using XML for B2B and B2C Applications
Large Co
</AddressLine>
<AddressLine>
Procurement Department
</AddressLine>
<AddressLine>
99 Purchase Road
</AddressLine>
<City>
Buy City
</City>
<State>
NY
</State>
<Zip>
10001
</Zip>
<Country>
USA
</Country>
</Address>
<Contact Type="primary">
<LastName>
Smith
</LastName>
<FirstName>
John
</FirstName>
<MiddleName>
L.
</MiddleName>
<Title>
Mr
</Title>
<ContactTelephone Type="primary">
914-111-6789
</ContactTelephone>
<ContactTelephone Type="primary">
914-111-6790
</ContactTelephone>
<EMail Type="primary">
jjsmith@largeco.com
</EMail>
<Fax>
914-111-6780
</Fax>
</Contact>
283
<Contact Type="primary">
<LastName>
Blow
</LastName>
<FirstName>
Joe
</FirstName>
<MiddleName>
J.
</MiddleName>
<Title>
Buyer
</Title>
<ContactTelephone Type="primary">
914-111-6722
</ContactTelephone>
<EMail Type="primary">
jblow@largeco.com
</EMail>
<Fax>
914-111-6780
</Fax>
</Contact>
</Member>
<Member MemberId="MemberId18" IdCodeType="ZZ">
<PartyName Partyname="PensWeAre">
</PartyName>
<CompanyTelephone>
945-123-1000
</CompanyTelephone>
<Address>
<AddressType>
location
</AddressType>
<AddressLine>
Pens Are We
</AddressLine>
<AddressLine>
Building 001
</AddressLine>
<AddressLine>
123 High Street
</AddressLine>
<City>
EarthQuake City
</City>
284
The XML Files: Using XML for B2B and B2C Applications
<State>
CA
</State>
<Zip>
94567
</Zip>
<Country>
USA
</Country>
</Address>
<Contact Type="primary">
<LastName>
Doe
</LastName>
<FirstName>
Jane
</FirstName>
<MiddleName>
E.
</MiddleName>
<Title>
Vice President of Internet Sales
</Title>
<ContactTelephone Type="primary">
945-123-4567
</ContactTelephone>
<EMail Type="primary">
janedoe@pensarewe.com
</EMail>
<Fax>
945-123-9999
</Fax>
</Contact>
</Member>
<Arbitrator MemberId="attr3" IdCodeType="attr4">
<PartyName Partyname="XYZArbitrator">
</PartyName>
<CompanyTelephone>
780-333-1111
</CompanyTelephone>
<Address>
<AddressType>
XYZArbitrator
</AddressType>
<AddressLine>
Suite 3
285
</AddressLine>
<AddressLine>
77 Lawyers Blvd
</AddressLine>
<City>
ABC City
</City>
<State>
MA
</State>
<Zip>
01234
</Zip>
<Country>
USA
</Country>
</Address>
<Contact Type="primary">
<LastName>
Black
</LastName>
<FirstName>
Joe
</FirstName>
<MiddleName>
K.
</MiddleName>
<Title>
</Title>
<ContactTelephone Type="primary">
780-333-4040
</ContactTelephone>
<EMail Type="primary">
jblack@xyzarbitrator.com
</EMail>
<Fax>
780-333-5000
</Fax>
</Contact>
</Arbitrator>
</Participants>
<Duration>
<Start>
<Date>
April 6, 2000
</Date>
<Time>
286
The XML Files: Using XML for B2B and B2C Applications
00:00:00
</Time>
</Start>
<End>
<Date>
April 6, 2001
</Date>
<Time>
00:00:00
</Time>
</End>
</Duration>
<InvocationLimit>
1000000
</InvocationLimit>
<ConcurrentConversations>
1
</ConcurrentConversations>
<ConversationLife>
86400
</ConversationLife>
</TPAInfo>
<Transport>
<Communication>
<HTTP>
<HTTPNode>
<OrgName Partyname="LargeCo">
</OrgName>
<HTTPAddress>
<URL URLName="requestURL">
https://www.largeco.com/jackal/servlet/OBIBuy
</URL>
</HTTPAddress>
</HTTPNode>
<HTTPNode>
<OrgName Partyname="PensWeAre">
</OrgName>
<HTTPAddress>
<URL URLName="logOnURL">
https://www.pensarewe.com/coyote/servlet/OBILogon
</URL>
<URL URLName="requestURL">
https://www.pensarewe.com/coyote/servlet/OBIsell
</URL>
<URL URLName="responseURL">
287
https://www.pensarewe.com/coyote/servlet/OBIsell
</URL>
</HTTPAddress>
</HTTPNode>
<NetworkDelay>
300
</NetworkDelay>
</HTTP>
</Communication>
<TransportSecurity>
<Encryption>
<Protocol>
SSL
</Protocol>
<Version>
3.0
</Version>
<Certificate>
<CertType>
X509.V3
</CertType>
<KeyLength>
1024
</KeyLength>
<Party>
<OrgName Partyname="LargeCo">
</OrgName>
<IssuerOrgName>
VeriSign, Inc.
</IssuerOrgName>
<IssuerCertSource>
http://www.verisign.com/certs
</IssuerCertSource>
</Party>
<Party>
<OrgName Partyname="PensWeAre">
</OrgName>
<IssuerOrgName>
GTE, Inc.
</IssuerOrgName>
<IssuerCertSource>
http://www.gte.com/certs
</IssuerCertSource>
</Party>
</Certificate>
288
The XML Files: Using XML for B2B and B2C Applications
</Encryption>
<Authentication>
<CertificateAuthen>
<Protocol>
SSL
</Protocol>
<Version>
3.0
</Version>
<Certificate>
<CertType>
X509.V3
</CertType>
<KeyLength>
1024
</KeyLength>
<Party>
<OrgName Partyname="LargeCo">
</OrgName>
<OrgCertSource>
http://www.verisign.com/certs
</OrgCertSource>
<IssuerOrgName>
VeriSign, Inc.
</IssuerOrgName>
<IssuerCertSource>
http://www.verisign.com/certs
</IssuerCertSource>
</Party>
<Party>
<OrgName Partyname="PensWeAre">
</OrgName>
<OrgCertSource>
http://www.gte.com/certs
</OrgCertSource>
<IssuerOrgName>
GTE, Inc.
</IssuerOrgName>
<IssuerCertSource>
http://www.gte.com/certs
</IssuerCertSource>
</Party>
</Certificate>
</CertificateAuthen>
</Authentication>
289
</TransportSecurity>
</Transport>
<DocExchange>
<DocExchangeProtocol>
OBI
</DocExchangeProtocol>
<MessageEncoding>
BASE64
</MessageEncoding>
<MessageIdempotency>
yes
</MessageIdempotency>
<MessageSecurity>
<NonRepudiation>
<Protocol>
Digital Signature
</Protocol>
<HashFunction>
D5
</HashFunction>
<EncryptionAlgorithm>
RSA
</EncryptionAlgorithm>
<SignatureAlgorithm>
DSA
</SignatureAlgorithm>
<Certificate>
<CertType>
X509.V3
</CertType>
<KeyLength>
1024
</KeyLength>
<Party>
<OrgName Partyname="LargeCo">
</OrgName>
<IssuerOrgName>
VeriSign, Inc.
</IssuerOrgName>
<IssuerCertSource>
http://www.verisign.com/certs
</IssuerCertSource>
</Party>
<Party>
<OrgName Partyname="PensWeAre">
290
The XML Files: Using XML for B2B and B2C Applications
</OrgName>
<IssuerOrgName>
GTE, Inc.
</IssuerOrgName>
<IssuerCertSource>
http://www.gte.com/certs
</IssuerCertSource>
</Party>
</Certificate>
</NonRepudiation>
</MessageSecurity>
</DocExchange>
<BusinessProtocol>
<ServiceInterface InterfaceId="attr6">
<OrgName Partyname="LargeCo">
</OrgName>
<Client>
<OrgName Partyname="PensWeAre">
</OrgName>
</Client>
<ActionMenu>
<Action ActionId="attr7" Type="basic"
Invocation="asyncOnly">
<Request>
<RequestName>
putOPOR
</RequestName>
<RequestMessage>
OBIPOR
</RequestMessage>
</Request>
<Response>
<ResponseName>
getOPO
</ResponseName>
<ResponseMessage>
OBIPO
</ResponseMessage>
</Response>
</Action>
</ActionMenu>
<ServerServiceTime>
<ServiceTime>
3600s
</ServiceTime>
291
<Presume>
fail
</Presume>
</ServerServiceTime>
<StartEnabled>
<RequestName>
putOPOR
</RequestName>
</StartEnabled>
</ServiceInterface>
<ServiceInterface InterfaceId="attr17">
<OrgName Partyname="PensWeAre">
</OrgName>
<Client>
<OrgName Partyname="LargeCo">
</OrgName>
</Client>
<ActionMenu>
<Action ActionId="attr18" Type="basic"
Invocation="asyncOnly">
<Request>
<RequestName>
shop
</RequestName>
<RequestMessage>
shopMessage
</RequestMessage>
</Request>
</Action>
<Action ActionId="attr19" Type="basic"
Invocation="asyncOnly">
<Request>
<RequestName>
putOPO
</RequestName>
<RequestMessage>
OBIPO
</RequestMessage>
</Request>
</Action>
</ActionMenu>
<ServerServiceTime>
<ServiceTime>
3600
</ServiceTime>
292
The XML Files: Using XML for B2B and B2C Applications
<Presume>
fail
</Presume>
</ServerServiceTime>
</ServiceInterface>
</BusinessProtocol>
</TPA>
293
294
The XML Files: Using XML for B2B and B2C Applications
Select the Additional materials and open the directory that corresponds with
the redbook form number.
File name
SG246104.zip
Description
Zipped Code Samples
295
296
The XML Files: Using XML for B2B and B2C Applications
297
Redbooks
Redbooks Logo
298
The XML Files: Using XML for B2B and B2C Applications
299
300
The XML Files: Using XML for B2B and B2C Applications
301
Collection Kit
Number
IBM System/390 Redbooks Collection
SK2T-2177
IBM Networking Redbooks Collection
SK2T-6022
IBM Transaction Processing and Data Management Redbooks CollectionSK2T-8038
IBM Lotus Redbooks Collection
SK2T-8039
Tivoli Redbooks Collection
SK2T-8044
IBM AS/400 Redbooks Collection
SK2T-2849
IBM Netfinity Hardware and Software Redbooks Collection
SK2T-8046
IBM RS/6000 Redbooks Collection (PDF Format)
SK2T-8043
IBM Application Development Redbooks Collection
SK2T-8037
IBM Enterprise Storage and Systems Management Solutions
SK3T-3694
302
The XML Files: Using XML for B2B and B2C Applications
http://www.w3.org/TR/NOTE-xml-ql
http://www.w3.org/Style/XSL/Group/1998/09/XQL-proposal.h
http://www.w3.org/Mobile/Activity
http://www.w3.org/TR/wbxml
http://www.wapforum.org
http://www.w3.org/RDF
http://www.w3.org/PICS
http://www.oasis-open.org/cover/sgml-xml.html
http://www.research.ibm.com/journal/sj38-1.html
http://www.alphaworks.ibm.com
http://www.unece.org/cefact
http://www.ebxml.org
http://java.sun.com/products/jsp/index.html
http://www.apache.org
http://www.voicexml.org
http://xml.apache.org
http://www.alphaworks.ibm.com
http://www.alphaworks.ibm.com/tech/DAV4J
http://www.ietf.org
http://www.w3.org/TR/NOTE-CCPP
http://www.patents.ibm.com
http://www.otp.org
http://www.ibm.com/software/data/net.data
http://www.ofx.net
http://www.developer.ibm.com
http://www.w3.org/TR/NOTE-ice
http://www.xmledi.com
http://www.openbuy.org
http://www.commerceone.com/xml/cbl
http://www.cxml.org
http://www.dsml.org
http://www.commerce.net
http://www.i2.com
http://www.ariba.com
http://www.xml.org
http://www.xml.org/xmlorg_registry/index.shtml
303
http://www.xml.org/xmlorg_resources
http://www.gte.com
http://www.verisign.com
http://www.dmtf.org
http://www.amc.com
http://w3.itso.ibm.com
http://w3.ibm.com
http://www.elink.ibmlink.ibm.com/pbl/pbl
304
The XML Files: Using XML for B2B and B2C Applications
e-mail address
pubscan@us.ibm.com
Contact information is in the How to Order section at this site:
http://www.elink.ibmlink.ibm.com/pbl/pbl
Telephone Orders
United States (toll free)
Canada (toll free)
Outside North America
1-800-879-2755
1-800-IBM-4YOU
Country coordinator phone number is in the How to Order
section at this site:
http://www.elink.ibmlink.ibm.com/pbl/pbl
Fax Orders
United States (toll free)
Canada
Outside North America
1-800-445-9269
1-403-267-4455
Fax phone number is in the How to Order section at this site:
http://www.elink.ibmlink.ibm.com/pbl/pbl
This information was current at the time of publication, but is continually subject to change. The latest
information may be found at the Redbooks Web site.
305
Order Number
First name
Quantity
Last name
Company
Address
City
Postal code
Country
Telephone number
Telefax number
VAT number
Card issued to
Signature
We accept American Express, Diners, Eurocard, Master Card, and Visa. Payment by credit card not
available in all countries. Signature mandatory for credit card payment.
306
The XML Files: Using XML for B2B and B2C Applications
Glossary
Application Service Provider (ASP) An ASP is
an agent or broker that aggregates, facilitates
and brokers IT services to deliver IT-enabled
business solutions across a network via
subscription-based pricing.
attribute In XML, a name="value" pair that can
be placed in the start tag of an element. The
value must be quoted with single or double
quotes.
Cascading Style Sheet (CSS) CSS defines a
stylesheet language for HTML 4.0. CSS allows
a Web page designer to separately specify style
elements of a Web page, such as colors, fonts
and font styles.
case-sensitive Indicates whether an
application, processor, or operating system
distinguishes between upper and lower case. If
it does, it is case-sensitive. XML tags are
case-sensitive, but HTML tags are not.
Customer relationship management (CRM)
CRM includes the systems and infrastructure
required to analyze, capture and share all parts
of the customers relationship with the
enterprise. From a strategy perspective, it
represents a process to measure and allocate
organizational resources to those activities that
have the greatest return and impact on
profitable customer relationships.
content model In XML, the expression
specifying what elements and data are allowed
within an element.
Document Object Model ( DOM) This allows
the representation and manipulation of an XML
document in memory as a programming object.
DOM is defined by the World-Wide Web
Consortium.
DOM (see Document Object Model).
DOM Tree A DOM Tree is an in-memory
representation of an XML Document.
Document Type Definition (DTD) A DTD is a
definition of which Elements and Attributes are
acceptable in a specific XML file. The DTD
307
308
The XML Files: Using XML for B2B and B2C Applications
Index
A
Aggregation 245
Application Framework for e-business 179
Application Service Providers 246
Auctions 245
B
B2B online intermediary 239
B2B server 190
B2B XML framework 177
B2C 139
B2C application model 140
Back end servers 141
BizTalk 30, 183
BPF 177, 204
BPF components 208
business integration 177
Business-to-business Protocol Framework 177,
184, 204, 208
business-to-consumer 139
Business-to-customer 139
business-to-employee 145
C
CC/PP 23, 160
client pull 143
Collaborative portal 146
Commerce Extensible Markup Language 160
Commerce XML (cXML) 182, 205
CommerceNet 30
Common Business Library 159
Composite Capability/Preference Profiles 23, 160
content generation 153
Content management 148
CORBA 179
CPEX 156
Customer Profile Exchange 156
Customization 158
cXML 160
E
ebXML project 182
eCo Specification 183
e-commerce 139, 157
e-commerce portal 146
electronic commerce 139
Electronic Data Interchange 181
electronic retail 139, 157
eMarketPlace 239, 241
eMarketPlace Information Portal 267
eMarketPlaces 241
Enterprise Java Beans 179, 212
Enterprise portal 144
enterprise portal 156
Enterprise Portals 11, 110
e-retail 139, 157
Exchange 245
Extensible HyperText Markup Language 23
Extensible Markup Language 17
Extensible Style Language 24, 260
F
Front end servers 141
G
D
DB2 XML Extender 29
developerWorks portal 165
Directory Services Markup Language 155
309
H
HTML 16, 17, 19
HTTP 16, 196
Hypertext Markup Language 17
HyTime 29
I
IBM Content Manager 167
IBM Enterprise Information Portal 166
IBM Intellectual Property Network 164
IBM Visual XML Builder 216
IBM WebSphere B2B Integrat 177
IBM XML Parser for Java 26
IBM XML Tools 217
ICE 159
Information and Content Exchange 159
Information portal 145
International Standards Organization 29
ISO 29
J
Java API for XML Parsing 29
JAXP 29
P
P3P 159, 258
PDA 160
personal digital assistans 160
Personalization 149, 152
PICS 22
PIX 158
Platform for Internet Content Selection 22, 258
Platform for Privacy Preferences Project 159, 258
Product Information Exchange 158, 259
Pyxie 29
Q
Query reporting 156
K
knowledge management 168
Knowledge portal 145
L
Lotus Raven 168
M
markup language 18
MathML 30
Metadata 21, 156
MQSeries 196
R
RDF 22, 158
RDF Schema 22
RDF Schemas 22
Resource Description Framework 19, 22, 158
RosettaNet 23, 159, 183
Namespaces 30
Net.Commerce 160, 172
SAX 26, 28
SAX API 26
search engine 19
server push 143
SGML 17, 29
Simple API for XML 26
SMTP 196
Standard Generalized Markup Language 16
tag 18
TPA 177
tpaML 23, 184, 185, 190
Trading Partner Agreement Markup Language 185
310
The XML Files: Using XML for B2B and B2C Applications
U
UML 157
UN/CEFACT 182
Unicode 29
Unified Modeling Language 157
Uniform Resource Identifier 20
Uniform Resource Locator 20
Unit of Business 185
unit of business 188
URI 20
URL 20
User profile 154
user profile 152
User to Business 139
V
VAN-EDI 197
X
xCBL 159
Xerces 26
XHTML 23, 161
XLink 20, 150
XLinks 162
XMI 156, 158, 217
XML 17, 18 , 19, 30
XML B2B framework 181
XML DTD 162
XML Enabler 163
XML Fragments 162
XML Linking Language 20
XML Metadata Interchange 156 , 158
XML Namespaces 21, 22, 28
XML parser 25
XML Path Language 21
XML Pointer Language 21
XML Query Tools 150
XML Schema 21
XML.ORG 185
XML.org 182
XML/EDI 159
XML/EDI Group 183
XPath 21, 30, 150
XPointer 21, 150
XPointers 162
XSL 24, 30, 150, 155, 162, 260
XSL stylesheet 24
XSL stylesheets 162
XSL Transformations 24
XSLT 24, 150, 155
311
312
The XML Files: Using XML for B2B and B2C Applications
Document Number
Redbook Title
SG24-6104-00
The XML Files: Using XML for Business-to-Business and
Business-to-Consumer Applications
Review
O Very Good
O Customer
O Business Partner
O IBM, Lotus or Tivoli Employee
O None of the above
O Good
O Average
O Poor
O Solution Developer
313
The XML Files: Using XML for B2B and B2C Applications
(0.5 spine)
0.475<->0.875
250 <-> 459 pages
INTERNATIONAL
TECHNICAL
SUPPORT
ORGANIZATION
BUILDING TECHNICAL
INFORMATION BASED ON
PRACTICAL EXPERIENCE
IBM Redbooks are developed by
the IBM International Technical
Support Organization. Experts
from IBM, Customers and
Partners from around the world
create timely technical
information based on realistic
scenarios. Specific
recommendations are provided
to help you implement IT
solutions more effectively in
your environment.
ISBN 0738418102