Tutorials > Program model > Web services
Tutorial: Customizing Web 2.0 and Web services to support personalization
This tutorial extends the OrderItem Web services noun to include new information. Overlays are used to transfer the new order information from the Madisons starter store to WebSphere Commerce, where it persists to the database.
Learning objectives
In this tutorial, we will customize the shopping flow to allow the customer the ability to keep track of engraving information for an order item. After this customization, a customer will have an option to engrave items in their shopping cart that can be engraved. For example, wine glasses will have the option to be engraved, with the shopper specifying the size and font of the text. You learn the development steps that are common to extending the noun using overlays, as well as using access beans to persist and retrieve the new data.
Time required
Expect this tutorial to take about 4 hours to complete.
Audience
This tutorial is intended for advanced WebSphere Commerce Store developers who are responsible for creating new business logic.
Prerequisites
Attention: When you use RAD to generate the Java artifacts, by default EMF 2.4 is chosen.
To work with WebSphere Commerce v7, explicitly select EMF 2.2 while you generate the Java artifacts. Refer to Set an EMF genmodel to generate 2.2 compatible objects for more information.
- Installed WebSphere Commerce Developer v7.
- Set up the development environment for creating WebSphere Commerce services.
Knowledge prerequisites
To complete this tutorial you should be familiar with the following terms and concepts:
- WebSphere Commerce Developer
- An understanding of the Java programming language.
- A basic understanding of the database type used in the WebSphere Commerce development environment.
- A basic understanding of JSP pages.
- A basic understanding of EJB beans.
- A basic understanding of Access beans.
- A basic understanding of XML.
Lessons in this tutorial
- Prepare the database for new engraving attributes
In this step, you create engraving attributes.
- Create the overlay type
In this step we will create an XSD file that extends the OrderItemType to include the new engraving attributes. Create an XSD using the recommended OAGIS directory structure and the custom namespace that contains the extended complex type with the additional elements and attributes.
- Create the SDO genmodel file
In this step we will create an genmodel file that will be used to generate the new EngravingOrderItemType object.
- Generate the SDO code from the genmodel file
In this step we will generate the new Service Data Object from the genmodel file.
- Use the new SDO to customize the client library and component facade
This section explains using the new SDO to customize the client library and component facade.
- Update the order shopping flow
This section explains how to update the order shopping flow..
- Customize the store
This section explains how to customize the store by adding engraving fields into the order item JSP file.
- Test the customization
This sections explains how to test the customization by performing a shopping flow.
- Customize Web 2.0 and Web Services to support personalization of order items
Customizing Web 2.0 and Web Services to support personalization of order items.