Chapter 10. Development of XML-bas ed Enterprise applications 217
In order to understand how these components interact with each other, have a
deep look at 10.2, Solution outline for customer registration sample on
page 217.
10.2 Solution outline for customer registration sample
An overview of the sample application can be found in Chapter 8. This section
discusses the interaction between solution components, before we progress to
building the application. There are two possible ways of interaction between the
components of the system. This difference in interaction is base d on the target
functionality. We focus on the set of interactions for storing data, then we discuss
the set of interactions for retrieving customer information.

Customer registration

When registering, the user enters the necessary registration data in the form
provided by the HTML in the client layer. When the user clicks the Submit button,
a series of interactions between system components take place, as indicated in
Figure 10-2 on page 218, and in the following steps:
1. The HTML sends the customer registration data through the HTTP request to
the servle t, invoking the ser vlet doPost metho d.
2. The servlet extracts the data from the request, and creates a new
CustomerXML object. Now the servlet invokes the create method in the
CustomerXML object.
3. The CustomerXML obje cts create method, instantiates a new
CustomerFactory, and invokes its create method having the customer
registration data.
4. The factory creates a customer entity bean with the customers registration
information.
5. The entity beans data is saved into the customer table in the database.
6. The customer entity bean is returned to the CustomerXML.
7. The CustomerXML executes its produceDOMDocument method, which
converts the Customer entity bean into XML data.
8. The XSLServ let applies the Customer Result XSL on the generated XML
data, by invoking the XSLT Processor.
9. The XSLT Processor applies the stylesheet on t he XML data, generating an
HTML representation for the customer registration data.