Next >
Tutorial: Customizing Web services and WebSphere Portal to support a new search
Customizing Web services and WebSphere Portal to support a new search expression.
Learning objectives
There are many options available when customizing the the service oriented architecture provided by the catalog sub-system. 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 the required minimum and maximum offer price into a databean. The results from that databean can then be passed to an existing Compose command for composition into a response BOD as defined by the catalog sub-system'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
Before beginning this tutorial ensure that you have fulfilled the following prerequisites:
- Installed WebSphere Commerce Developer.
- Installed WebSphere Commerce Developer Fix pack 2.
- Installed the component-services iFeature from WebSphere Commerce enhancements for version 6.
- Enabled WebSphere Commerce services.
- Install the development environment for WebSphere Portal Server (Rational Application Developer version 7).
Ensure that you check Portal Tools and IBM Websphere Application Server, v6 in feature selection.
![]()
- Install WebSphere Portal Development Server. See Installing a new version with WAS in the WebSphere Portal Server information Center for more information.
- Configure WebSphere Portal with WebSphere Commerce using simulated single sign-on.
WebSphere Portal Server v6 only works with WAS version 6.0. The WebSphere Portal v6 test environment has global security enabled by default. During installation, you will be asked for the username and password. Use the following values: WAS Admin username: wpsbind/wpsbind Portal Admin user: wpsadmin/wpsadmin
Due to performance considerations when executing searches, IBM recommends that you use DB2 as the database for this tutorial. Some searches may take up to 15 minutes to execute on the Cloudscape database that is packaged with WebSphere Commerce Developer.
Knowledge prerequisites To complete this tutorial you should be familiar with the following terms and concepts:
- Understanding of the Java programming language.
- Basic understanding of the database type used in your WebSphere Commerce development environment.
- Basic understanding of JSP pages.
- Basic understanding of EJB beans.
- Basic understanding of access beans and data beans.
- Eclipse plug-ins.
- 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
- Create the project structure in the WebSphere Commerce development environment
In this step we will create the project structure to be used in WebSphere Commerce Developer.- Change the code to allow additional search parameters
Adding new search parameters to the fetch command.- Registering the new command
This section explains how to register the new command.- Testing the new fetch command
This section refers to testing the new fetch command.- Set up the WebSphere Portal development environment
In this step of the tutorial, you set up your WebSphere Portal development environment to start working with WebSphere Portal Server.- Create the TCP/IP monitor
This section refers to creating the TCP/IP monitor.- Registering the static content URL reference
In this step, you register the URL of the Store on the WebSphere Portal Server.- Create a JSP Snippet to display the price search fields
This section refers to creating a JSP Snippet to display the price search fields.- Change SearchDisplay.jsp to use the new search expression
This section refers to changing SearchDisplay.jsp to use the new search expression.- Add an expression-builder for the new search expression
This section refers to adding an expression-builder for the new search expression.- Testing the new search expression
This section refers to the testing of the new search expression.- Customizing Web services and WebSphere Portal to support a new search expression
This section summarizes the tutorial. Next >