Samples Tutorial

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

(Optional) Consuming Data Services through Portals & Business Processes

The previous lessons demonstrated how ALDSP provides a convenient way to quickly access ALDSP from a WebLogic Workshop application such as page flows, process definitions, or portals. This optional lesson details the steps you take to use a portal to access data services.

Note: WebLogic Portal must be installed.

 


Objectives

After completing this lesson, you will be able to:

 


Overview

At its most basic level, a portal is a Web site that simplifies and personalizes access to content, applications, and processes. Technically speaking, a portal is a container of resources and functionality that can be made available to end-users. These portal views, which are called Desktops in WebLogic Portal, provide the uniform resource location (URL) that end users access.

Figure 17-1 Consuming Data Services from Portals

Consuming Data Services from Portals

 


17.1 Installing a Data Service Control in a Portal Project

The steps within this exercise are similar to those detailed in Installing a Data Service Control.

Objectives

In this exercise, you will:

Instructions

  1. Right-click the Evaluation application.
  2. Choose Install Arrow symbol Portal. ALDSP installs the necessary portal files and libraries.
  3. Create a new portal web project by completing the following steps:
    1. Right-click the Evaluation application.
    2. Choose Import Project.
    3. Select Portal Web Project.
    4. Select MyPortal, located in the <beahome>\weblogic81\samples\ liquiddata\EvalGuide directory.
    5. Click Open and then click Import.
    6. Figure 17-2 Importing a Portal Web Project


      Importing a Portal Web Project

  4. Create a new folder in the MyPortal folder, and name it controls.
  5. Create a Data Service Control within the portal by completing the following steps:
    1. Right-click the MyPortal project.
    2. Choose New Arrow symbol Java Control.
    3. Select Data Service Control and name it CustomerData.
    4. Figure 17-3 Creating a New Data Service Control


      Creating a New Data Service Control

    5. Click Next and then click Yes at the Message window.
    6. Select MyPortal\controls as the subfolder in which to locate the new control.
    7. Click Select. The New Java Control Arrow symbol ALDSP window opens.
    8. Figure 17-4 Setting Data Service Control Specifications


      Setting Data Service Control Specifications

    9. Click Create to accept the default settings. A list containing available data service queries displays.
    10. Open CustomerProfile.ds (located in DataServices\CustomerManagement) and select the following methods:
      • getCustomerProfile()
      • submitCustomerProfile()
  6. Click Add and then Finish.
  7. Figure 17-5 Selecting Query Functions


    Selecting Query Functions

  8. After creating the ALDSP control, perform the following steps:
    1. Open the CustomerData.jcx control in Source View.
    2. Add a new function with the same signature as the getCustomerProfile() function and name it getCustomerProfileWithFilter.
    3. Add the following parameter to the getCustomerProfileWithFilter() function:
    4. FilterXQuery filter
    5. After adding this parameter, the function signature will display as follows:
    6. getCustomerProfileWithFilter (CustomerID String, filterXQuery filter)

 


17.2 Testing the Control and Retrieving Data

As with all data services, you should test functionality before you deploy the application.

Objectives

In this exercise, you will:

Instructions

  1. Open CustomerManagement.portal.
    1. Click the Start icon to open the Workshop Test Browser and run the portal application containing the CustomerManagementWebApp and the CustomerReport that were used in earlier lessons.
    2. Enter CUSTOMER3 in the Customer ID field and press Submit. The Customer Profile Information page opens.
    3. Figure 17-6 Portal Access to Web Application Data


      Portal Access to Web Application Data

    4. Click the Reports link. For the Reports page, the first invocation may take a few moments before displaying.
    5. Figure 17-7 Portal Access to Crystal Reports Data


      Portal Access to Crystal Reports Data

    6. Open the process.jpd file, located in the MyPortal\processes folder. You will see the Design View of the process definition that accepts a CUSTOMER_ID String, invokes the Data Service Control, and returns the customer information in an XML document.
    7. Figure 17-8 Design View of process.jpd File


      Design View of process.jpd File

    8. Click the Start icon to test the process definition.
    9. Enter CUSTOMER3 in the Customer ID field and then click clientRequestwithReturn.
    10. Scroll through the page to view customer information included in the "Returned from getCustomerProfile on LDControl" section.
    11. Figure 17-9 Business Process View of Customer Data


      Business Process View of Customer Data

 


Lesson Summary

In this lesson you learned how to:


  Back to Top       Previous  Next