Tutorials > Program model > Web services


Next >


Tutorial: Customizing Web services and WebSphere Portal to support a new search

Attention: This tutorial is currently under revision. The content might contain errors or inaccuracies. Subscribe to this page to be notified when an updated version is available.

Customize Web services and WebSphere Portal to support a new search expression.


Learning objectives

There are many options available when customizing the service-oriented architecture provided by the Catalog subsystem. One such customization is to allow searching based on data fields that were not included in any existing commands.

In this scenario, a new search expression is created to allow the user to search for all types of catalog entries in a catalog based on the minimum and maximum offer price.

In order to accomplish this goal, it is necessary to create a new Fetch command which will set the required minimum and maximum offer price into a data bean. The results from that data bean can then be passed to an existing Compose command for composition into a response BOD as defined by the Catalog subsystem's logical model. That response BOD is sent to the portal server to display.

This implies that the only new code artifact which must be generated is the fetch command as mentioned. This tutorial will show you how such a fetch command is created, and in turn how the results produced by that fetch command can be consumed by an existing compose command. Then, instructions will be given to show how the new fetch command can be packaged into either a toolkit environment, or a WebSphere Commerce production server environment.


Time required

Expect this tutorial to take about 2 hours to complete if the prerequisite steps have been completed.


Audience

This tutorial is intended for advanced developers who are responsible for creating new business logic.


Prerequisites

IBM recommends, but not required, that you complete the Tutorial: Creating a WebSphere Commerce Service Module tutorial before you start this tutorial, in order to understand the integration points between the WebSphere Commerce Server and the WebSphere Portal Server. This tutorial demonstrates how to modify a pre-configured WebSphere Commerce standard portlet in the WebSphere Portal server to communicate with the created TutorialStore service.

Before beginning this tutorial, do these tasks:

  1. Install WebSphere Commerce Developer.

  2. Setup the WebSphere Commerce Portal development environment.

  3. Create a WebSphere Commerce sample portal page on WebSphere Portal.

  4. Set up the TutorialStore service on WebSphere Commerce, following the steps in Tutorial: Creating a WebSphere Commerce service module.

    To skip the tutorial, follow the instructions in Deploying the component facade starting at step 3. The files mentioned in the task are provided in the following ZIP file: tutorialstore_process_projectinterchange.zip.

  5. Download and unzip the sample tutorial code, PortalTutorial.zip, to a temporary location on the hard drive.

  6. Copy WCDE_INSTALL/portal/MVCPortlet from the WebSphere Commerce Developer environment to the same temporary location on the hard drive.

  7. Copy the contents from the TutorialStoreServer/sampleConfig/xml/config directory to the WC_EAR/xml/config directory.

  8. Run the following SQL statements to prepare the WebSphere Commerce Developer database:

  9. Configure the message mapper for the Process action:

  10. Verify the TutorialStore service is functioning properly.

Knowledge prerequisites

To complete this tutorial you should be familiar with the following terms and concepts:

  1. Understand of the Java programming language.

  2. Basic understanding of the database type used in the WebSphere Commerce development environment.

  3. Basic understanding of JSP pages.

  4. Basic understanding of EJB beans.

  5. Basic understanding of access beans and data beans.

  6. Eclipse plug-ins.

  7. Rational Application Developer.

To perform the customization, extensions are required to both the WebSphere Commerce Server and the WebSphere Portal Server.


Lessons in this tutorial

Next >


+

Search Tips   |   Advanced Search