11.2 Solution outline for customer registration sample

An overview of the sample application can be found in Chapter 8., “WebSphere and XML approaches” on page 163. This chapter 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 based 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.

11.2.1 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 presses the Submit button, a series of interactions between system components take place, as indicated in Figure 11-2 on page 260, and in the following steps:

1.The HTML sends the customer registration data through the HTTP request to the servlet, invoking the servlet doPost method.

2.The servlet extracts the data from the request, and creates a new CustomerXML object and set required properties with the extracted registration data.

3.The servlet invokes Customer XML object’s produceDOMSource method and get an XML document.

Tip: The XML document can be created manually using JAXP.

4.The servlet invokes XMLToSQL library.

5.XMLToSQL executes INSERT using the XML document.

6.The servlet instantiate XSLT Processor.

7.The XML document is input for the XSLT Processor.

8.The pre-designed XSL applied and result HTML has been generated and transferred to the browser.

Chapter 11. Light weight XML-based Enterprise Application 259

Page 275
Image 275
IBM Version 5 manual Customer registration, Light weight XML-based Enterprise Application