56
Oracle Clipping Edition Kapow Mashup Server 6.4 Quick Start Guide

Quick Start Guide Oracle Clipping Edition

Embed Size (px)

Citation preview

Page 1: Quick Start Guide Oracle Clipping Edition

Oracle Clipping Edition

Kapo

w M

ashu

p Se

rver

6.4

Quick Start Guide

Page 2: Quick Start Guide Oracle Clipping Edition
Page 3: Quick Start Guide Oracle Clipping Edition

Quick Start Guide Oracle Clipping Edition

Page 4: Quick Start Guide Oracle Clipping Edition

Copyright 1999-2008 Kapow Technologieshttp://www.kapowtech.com All rights reserved.

Page 5: Quick Start Guide Oracle Clipping Edition

CONTENTS iii

Contents

WELCOME TO KAPOW MASHUP SERVER .......................................................... 5 Installation ........................................................................................5 About the Guide .................................................................................5 Contact Information ............................................................................5

Support ..........................................................................................5 Kapow Developer Connection.............................................................5

OVERVIEW OF KAPOW MASHUP SERVER ......................................................... 6 Web Integration .................................................................................6 Enter Kapow Mashup Server.................................................................7 How It Works .....................................................................................8

Robots ...........................................................................................8 Objects ..........................................................................................9

Summary ..........................................................................................9 KAPOW MASHUP SERVER APPLICATIONS ...................................................... 10

Creating Robots................................................................................ 10 Running Robots ................................................................................ 11 Managing Robots .............................................................................. 11

DOCUMENTATION OVERVIEW..................................................................... 12 User Guides ..................................................................................... 12 Programmer Guides .......................................................................... 12 Administrator Guides......................................................................... 13 Recommended Reading ..................................................................... 13

Clipping........................................................................................ 13 Advanced Clipping.......................................................................... 14

Other Uses than Clipping ................................................................... 14 QUICK START TUTORIAL: CLIPPING ............................................................ 15

Overview......................................................................................... 15 Before You Start ............................................................................ 15

Creating the Clipping Robot................................................................ 15 Step 1 – Start RoboMaker ............................................................... 16 Step 2 – Create a New Robot........................................................... 16 Step 3 – Choose Robot Type............................................................ 17 Step 4 – Enter the URL to Start From................................................ 18 Step 5 – Configure the URLs to Clip .................................................. 19 Step 6 – Add a New Clip Branch ....................................................... 21 Step 7 – Enter Name of New Clip Branch ........................................... 22 Step 8 – Hide a Button ................................................................... 23

Page 6: Quick Start Guide Oracle Clipping Edition

iv KAPOW MASHUP SERVER QUICK START GUIDE

Step 9 – Select the Logo ................................................................. 23 Step 10 – Select the Search Form .................................................... 25 Step 11 – Show the Clip.................................................................. 26 Step 12 – Make a Search ................................................................ 27 Step 13 – Ensure the Correct Clip Branch is Used ............................... 28 Step 14 – Save the Robot ............................................................... 30

Deploying the Clipping Robot from RoboMaker ...................................... 31 Step 15 – Create a Portlet Producer Application in JDeveloper .............. 31 Step 16 – Start the Oracle Clipping Wizard ........................................ 33 Step 17 – Choose Portlet Name........................................................ 34 Step 18 – Finish the Wizard............................................................. 35

Running the Clipping Robot ................................................................ 36 Step 20 – Start the Preconfigured Server .......................................... 37 Step 21 – Define a Connection to the Preconfigured Server .................. 38 Step 22 – Create a Producer Deployment Profile................................. 40 Step 23 – Deploy the Portlet from the Producer Application .................. 42 Step 24 – Create a Portlet Consumer Application ................................ 44 Step 25 – Create a Connection to the Portlet Producer......................... 47 Step 26 – Add the Portlet to the Consumer Application ........................ 48 Step 27 – Start RoboServer............................................................. 49 Step 28 – Test the Clipping Portlet ................................................... 50

Summary ........................................................................................ 51 Next Steps....................................................................................... 51

INDEX.................................................................................................. 53

Page 7: Quick Start Guide Oracle Clipping Edition

WELCOME TO KAPOW MASHUP SERVER 5

Welcome to Kapow Mashup Server Welcome to the Kapow Mashup Server product suite. In this guide you will get a brief overview of the entire product and its manuals.

Installation Read the Installation Guide for a description of how to install the product. This is not covered in this overview.

About the Guide This guide is intended as a quick and not too technical introduction to Kapow Mashup Server. This particular edition of the Quick Start Guide is written explicitly for Oracle Clipping customers. Much material that was irrelevant for Oracle Clipping customers has been left out, and extra material on integration with Oracle Webcenter and Oracle Portal has been added. The Guide contains a short introduction to the Kapow Mashup Server product, a description of the applications in the suite, and an overview of the available manuals. We also present a list of recommended reading, necessary to get you started with the product. Finally, the guide contains a simple tutorial describing Web Clipping. The tutorial will guide you through a simple case step by step, introducing you to the relevant applications of Kapow Mashup Server and how they are interconnected.

Contact Information

Support Oracle customers are requested to send support questions directly to Oracle support.

Kapow Developer Connection The Kapow Developer Connection provides access to many resources for developers. It contains the latest downloads, as well as a problem tracking system, and a discussion forum. It is located at this URL:

http://kdc.kapowtech.com/

Page 8: Quick Start Guide Oracle Clipping Edition

6 KAPOW MASHUP SERVER QUICK START GUIDE

Overview of Kapow Mashup Server Kapow Mashup Server is a platform for Web Integration. In this chapter, we will describe the meaning of that term, and the role of Kapow Mashup Server in bringing about this integration.

Web Integration Web Integration is the process of leveraging the informational and functional resources of the Web in an application of your choice.

There are a number of compelling reasons why such an approach would be interesting. The first and most obvious is the sheer quantity of resources. Second, the Web integration approach allows you to take advantage of existing enterprise information systems (EIS) that provide Web interfaces.

The challenges in implementing such a solution from scratch should also be obvious. The resources are there, but they are notoriously heterogeneous, and are often dispersed among several pages. Another complication is the language in which the resources are available – Hypertext Markup Language (HTML). The very thing that has contributed to its success (its loose and forgiving syntax) makes it very difficult to impose structure on HTML. Add to this the complexity of client-side JavaScript, user validation and session handling, and the solution becomes non-trivial.

Page 9: Quick Start Guide Oracle Clipping Edition

OVERVIEW OF KAPOW MASHUP SERVER 7

Enter Kapow Mashup Server Kapow Mashup Server helps transform the resources of the Web into well-defined nuggets of information and functionality. In the Oracle Clipping Edition the focus is on extracting parts of web pages for display in a portlet, often in a suitably modified form. However, the full Kapow Mashup Server product is also able to transform a web site into one or more services (e.g. REST or SOAP services), and can extract data from the Web and provide it as an RSS/ATOM feed or store it in a database. Most importantly, this is all done in a non-intrusive way. Figure 1 illustrates how the Kapow Mashup Server accomplishes Web Integration.

Figure 1: Web Integration with Kapow Mashup Server

Your

Application

Kapow Mashup Server

Website

Website

Website

Page 10: Quick Start Guide Oracle Clipping Edition

8 KAPOW MASHUP SERVER QUICK START GUIDE

How It Works The following figure goes into more detail on the architecture of the Kapow Mashup Server based solution for Clipping. The central component in executing the integration is called RoboServer. RoboServer receives a request for page content from your application and executes what is called a robot. We will give a more detailed description of what a robot is shortly. For now it is sufficient to know that to integrate with a web site you write a robot that when executed interacts with that web site. This is illustrated in Figure 2 below. This figure also illustrates how your application interacts with RoboServer via a standard Java (JSR 168) portlet, which is part of the Kapow Mashup Server product. This portlet is made available to your application via Oracle’s WSRP support.

Figure 2: How Kapow Mashup Server Works

Robots Robots are the fundamental concept in the Kapow Mashup Server product. A robot can be thought of as a small program that performs some sort of interaction or data extraction from the Web.

Your Oracle WebCenter/Portal application

WSRP Producer

Kapow Mashup Server JSR 168 Portlet

RoboServer

Robot

Website

Robot

Website

Robot

Website

Robot

Website

Page 11: Quick Start Guide Oracle Clipping Edition

OVERVIEW OF KAPOW MASHUP SERVER 9

The programming analogy is not wholly accurate, however. Robots can be written and maintained by non-programmers using a set of intuitive visual builder tools. By navigating the target web pages in a built-in browser, the user defines the actions that the robot will take. In this regard, robots have much in common with macros, and can also be described as macros for the Web.

Objects The robot is invoked by the portlet via RoboServer whenever it needs to respond to a user action (e.g. a mouse click on a button). The portlet sends information to the robot about the user action – wrapped in an input object – and receives page content back from the robot – wrapped in an output object.

For advanced forms of clipping, it is possible to exchange other kinds of input or output objects between the portlet and the robot. Thus the robot developer decides what kind of objects a robot takes as input, and which objects it may return. The objects are modeled to fit real-world objects, like cars, houses, stock quotes, and airplane reservations. After the modeling of objects is done, the robot developer can create the robots that actually perform the tasks, e.g. searching for products (e.g. for a price comparison site), booking airplane tickets, retrieving stock quotes or accessing customer information in a CRM system.

When specialized input or output objects are added in this way, the portlet also must be equipped to handle the objects. This is done by plugging in custom Java code based on the Clipping API.

Summary In this chapter, we explained the nature of Web Integration, and how Kapow Mashup Server fits as the solution for this.

Page 12: Quick Start Guide Oracle Clipping Edition

10 KAPOW MASHUP SERVER QUICK START GUIDE

Kapow Mashup Server Applications Kapow Mashup Server is made up of several applications. Figure 3 shows the relationship between the different applications, and how they are used to write, run and manage a collection of robots.

Robot

Robo-Maker

creates

ObjectModel

uses

LogDatabase

Log Message

Robo-Manager

works on

Robo-Server

(or Robo-Runner)

YourApplication

Model-Maker

executes

creates

interactswith

generates

Websiteinteracts with

Website

Website

Website

RoboSuiteControlCenter

monitors

Figure 3: Kapow Mashup Server Architecture Overview

Creating Robots The most essential role in a solution based on Kapow Mashup Server is that of the robot developer, the person responsible for writing and maintaining robots. The main tools of a robot developer are RoboMaker and – for advanced work – ModelMaker:

RoboMaker: The central tool in Kapow Mashup Server, RoboMaker allows you to create and debug robots.

ModelMaker: ModelMaker is an application for modeling the objects used by a robot. These include the objects a robot extracts (and returns to the caller), and the objects it requires as input parameters.

As a user of Kapow Mashup Server, you should be familiar with RoboMaker.

Page 13: Quick Start Guide Oracle Clipping Edition

KAPOW MASHUP SERVER APPLICATIONS 11

Running Robots Robots are executed by the RoboServer application on behalf of the portlets. The two parties are connected with a specialized communication protocol that also provides monitoring facilities.

RoboServer: RoboServer allows portlets and other remote clients to execute robots. It accepts requests and sends back replies to client applications.

Control Center: Control Center allows you to remotely monitor Robo-Servers and their robots.

Managing Robots Managing a single robot or even a couple of robots is quite easy. Keeping track of hundreds or thousands is a challenge. RoboManager is a tool that helps you deal with this complexity.

RoboManager: A tool for organizing and maintaining a large number of robots. RoboManager allows you to monitor how each robot is performing in order to detect robot failures or other problems.

Page 14: Quick Start Guide Oracle Clipping Edition

12 KAPOW MASHUP SERVER QUICK START GUIDE

Documentation Overview This section describes each manual in turn and finally provides a list of recommended reading.

User Guides The user’s guides describe the applications that make up the suite, one by one.

RoboMaker User's Guide: A comprehensive guide to writing robots in RoboMaker, and debugging robots in the integrated debugging tool RoboDebugger.

ModelMaker User's Guide: Gives an introduction to ModelMaker, as well as an overview of the object model.

RoboServer User's Guide: Describes RoboServer and RoboClient. The guide also describes the Robot Query Language (RQL) that is used to communicate with RoboServer.

Control Center User's Guide: Describes how to monitor RoboServers and their robots using the Control Center.

RoboManager User's Guide: Describes how to organize and manage a large number of robots using RoboManager.

Code Generation Guide: Describes the various wizards for code generation, e.g. Java, C# and clipping.

Programmer Guides The programming APIs come with a set of programming guides to complement the user’s guides.

Java Programmer's Guide: Explains the core of the Kapow Mashup Server Java API. Its significance for clipping is that the Clipping API (see below) is based on the Java API. The target audience for this book is Java programmers of varying skill levels.

Clipping Programmer's Guide: Explains how to use the Clipping API together with custom-written Java code to adapt the clipping functionality in various ways. Knowledge of key parts of the Java API is assumed. The target audience for this book is Java programmers of varying skill levels.

In addition to these programming guides, the APIs come with a set of reference documentation, which is installed as part of the installation.

Page 15: Quick Start Guide Oracle Clipping Edition

DOCUMENTATION OVERVIEW 13

Administrator Guides Kapow Mashup Server comes with an installation guide that describes how to install and set up the application suite.

Installation Guide: Describes how to install Kapow Mashup Server. It also details the Settings application. It does not go into detail on how to set up Kapow Mashup Server for particular needs, such as Clipping.

RQL Service User's Guide: An advanced guide to configuring RoboServer, and setting up the communication protocols it uses.

Recommended Reading In this section, we take a look at which parts of the manuals you need to read based on the premise that Clipping is your primary interest. The full version of the Kapow Mashup Server product provides many additional functions, which are covered within the same set of documentation. Thus this is your guide to finding the relevant manuals and chapters to read with regard to Clipping.

It is recommended that you start reading the material listed under “Clipping” below. This will give you a solid foundation for reading further and your first attempts at creating a Clipping robot.

If you want to know what the Kapow Mashup Server product can do for you beyond Clipping, please refer to the section “Other Uses than Clipping”.

Clipping Before starting to use Kapow Mashup Server for clipping web sites and reusing them in another context, you should read the following material.

• RoboMaker User's Guide:

Introduction

RoboMaker Basics

Getting Started

How to Clip

This will give you a good understanding of how Clipping works. To deploy Clipping robots for real-world use, you will also need to read:

• RoboServer User's Guide

Introduction

Starting RoboServer

Getting a Feel for RoboServer

Understanding RQL (optional)

• Code Generation Guide

Oracle Portal/WebCenter 10g/11g Clip Wizard

Page 16: Quick Start Guide Oracle Clipping Edition

14 KAPOW MASHUP SERVER QUICK START GUIDE

If you want to exercise greater control over the Clipping robots, continue with the material listed in the following section.

Advanced Clipping If you want to work with specialized input or output objects in your clipping robots or fine-tune their behavior in other ways, you need to write some Java code and integrate it into your portal application. Needless to say, you should have some Java programming experience before you attempt to use the Java API.

• ModelMaker User's Guide

Introduction

ModelMaker Basics

Tutorial: Creating a Domain Model

• Java Programmer's Guide

Introduction

Core Functionality

• Clipping Programmer's Guide

(Select chapters according to your needs)

Subsequently, try the examples provided as part of the distribution (in the API/robosuite-java-api/examples folder).

Other Uses than Clipping While Clipping extracts data from the Web and delivers it in the form of HTML pages, the Kapow Mashup Server is able to deliver data in other ways. For example, it can provide extracted data via Web Services (e.g. REST or SOAP services), and it can extract data from the Web and provide it as an RSS/ATOM feed. Alternatively, extracted data can be included in a new Web application with the aid of a JSP tag library. This means that you can present the data according to your requirements and will not have to depend on the structure of the Web site it was extracted from.

In addition, the Kapow Mashup Server can provide extracted data to any Java or C# program, or it can store the data in a database (this is the way to do large-scale data collection).

These features are not included in the Oracle Clipping Edition. Please refer to

http://kapowtech.com

for further information.

Page 17: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 15

Quick Start Tutorial: Clipping This chapter contains a short tour of Kapow Mashup Server to introduce Clipping. It will guide you through the creation and execution of a simple clipping robot for use on a web page. It should take about 45 minutes to complete.

The goal of the tour is to introduce you to the basic clipping concepts and show you an example of how to deploy a clipping robot. The robot will be deployed on a simple web page created in Oracle WebCenter using Oracle JDeveloper Studio as the development environment. We assume that the reader has basic knowledge of this tool.

Overview We will be creating a simple clipping robot that is used for transferring the search functionality of Google into a Java portlet. We will then deploy the clipping robot and the portlet to JDeveloper’s “Preconfigured OC4J” (Oracle Container for Java EE). This makes it possible to access the portlet via WSRP. We will then create a simple WebCenter web page that features our portlet, so that we can see it in action. Throughout the tutorial, we will refer to this web page as the “portal”, meaning simply the context in which the portlet is displayed.

This will provide you with a working development-time example of how to use clipping robots. You may then create deployment scenarios for Oracle WebCenter or Oracle Portal in the usual way.

Note that Google adapts itself to your local environment and furthermore changes over time. This means that you may not experience exactly the same results as shown in the figures.

Before You Start Clipping is enabled in collaboration between a RoboServer and Oracle software. To get full benefit from this tutorial, you will therefore need to have Kapow Mashup Server installed on your system. If you have not installed Kapow Mashup Server already, now would be a good time. You can find help on how to do this in the Installation Guide.

Similarly, you will need to have Oracle JDeveloper Studio 10g (version 10.1.3.3.0 or later) or 11g installed on your system.

Creating the Clipping Robot We start by creating the clipping robot, using the RoboMaker application.

Page 18: Quick Start Guide Oracle Clipping Edition

16 KAPOW MASHUP SERVER QUICK START GUIDE

Step 1 – Start RoboMaker If RoboMaker is not already running, start it now, e.g. by selecting it from the Start Menu (on Windows systems).

Step 2 – Create a New Robot If you have just started RoboMaker, select Create a new robot… in the welcome screen and click OK. Otherwise, press the icon to open the New Robot Wizard.

Figure 4: Creating a New Robot

Page 19: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 17

Step 3 – Choose Robot Type In the first wizard step, select “Clipping robot” and click Next.

Figure 5: Choosing Robot Type

Page 20: Quick Start Guide Oracle Clipping Edition

18 KAPOW MASHUP SERVER QUICK START GUIDE

Step 4 – Enter the URL to Start From In the next wizard step, enter the URL to start from:

www.google.us

and then click Finish to create the robot:

Figure 6: Entering the URL to Start From

Page 21: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 19

The RoboMaker Main Window should now look similar to the one shown in Figure 7.

Figure 7: The Clipping Robot

A simple robot has been created, consisting of four steps. The first step is called Begin Clip, and the remaining steps form the default clip branch of the robot. The default clip branch is the branch that will be used for clipping all pages that you do not define specific clip branches for.

Also notice that the Portlet View has opened. The Portlet View shows your clips as they will appear in the portlet. You can interact with the clips in the same way as a user interacts with the portlet.

By default, the Portlet View opens and closes automatically as needed. However, you can also open and close the Portlet View yourself by clicking the

icon in the Main Window of RoboMaker.

As a rule of thumb, you should always use the Portlet View when navigating a clipping robot. Within the current clip branch, however, you can change steps as usual.

Step 5 – Configure the URLs to Clip The next thing we want to do is to configure which URLs the robot should clip. We want all pages on Google itself to be clipped and be shown inside the

Page 22: Quick Start Guide Oracle Clipping Edition

20 KAPOW MASHUP SERVER QUICK START GUIDE

portlet, but all links away from Google – such as when the user clicks a link in a search result – should open in a new window and not be clipped. This way, the users of your portal will stay in your portal as long as they navigate on Google, but any links away from Google will open in new windows separately from your portal.

To do this, click the button in the Portlet View to open the Robot Configuration Window.

Figure 8: Robot Configuration Window

In the “Clipping Restrictions” property, select “Include Only URLs in these Domains”. In the “Domains” property that appears, enter “*.google.*” to

Page 23: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 21

include all links on Google. Make sure the “Excluded Links” property is set to “Open in New Window”, so that other links will open in new windows.

In addition, set the “Maximum Height” property to 450 to make the end result look better.

Click OK to close the Robot Configuration Window.

The clipping robot that you have now is a fully functional clipping robot, and you can skip forward to step 12 if you want to try the robot as it is. Alternatively, you can continue the tutorial and see how you can make modifications to the Google pages as part of the clipping.

Step 6 – Add a New Clip Branch We want to modify how the start page of Google looks in the portlet. To do this, first add a new clip branch specifically for this page. In the Portlet View, click the icon to open the Edit Clip Wizard:

Figure 9: Adding a New Clip Branch

Make sure the “Add new clipping rules” option is selected, and click Next to continue.

Page 24: Quick Start Guide Oracle Clipping Edition

22 KAPOW MASHUP SERVER QUICK START GUIDE

Step 7 – Enter Name of New Clip Branch On the next wizard page, you can enter a name for the new clip branch. For the purpose of this tutorial, use the suggested name, “First Page”:

Figure 10: Entering the Name of the New Clip Branch

Click Finish to add the new clip branch. You will now be placed at the location in the robot where you can configure the new clip branch. The Portlet View will close automatically to allow you to use the Main Window for this.

Page 25: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 23

Step 8 – Hide a Button The first modification is to hide the search button called “I’m Feeling Lucky”. In the Browser View, right-click on the “I’m Feeling Lucky” button and choose “Hide Tag”, as shown in Figure 11.

Figure 11: Hiding a Button

The page will now be redisplayed without the button.

Step 9 – Select the Logo The next modification is to select the parts of the page to clip. This is done by configuring the Clip step, so ensure that you are on the first Clip step – click on it if not.

In the Browser View, click on the Google logo, so that a green box appears around it. If the green box covers only part of the logo, click the icon in the toolbar above the Browser View to expand the box until it covers the logo. If the box becomes too big, click the icon to reduce it. When the green box

Page 26: Quick Start Guide Oracle Clipping Edition

24 KAPOW MASHUP SERVER QUICK START GUIDE

covers the logo, right-click in the box and select “Use only this Tag”, as shown in Figure 12.

Figure 12: Selecting the Logo

This will select the Google logo as one of the tags to clip from the page.

Page 27: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 25

Step 10 – Select the Search Form Then, in the Browser View, click the text input field (the search field). In the toolbar above the Browser view, click the icon to expand the green box until it covers the search form and the links beside it (see Figure 13 below). If the box becomes too big, click the icon to reduce it. When the box covers the form and the links, right-click in the box and select “Use this Tag” (not “Use only this Tag”), as shown below:

Figure 13: Selecting the Search Form

Now, you have selected the Google logo and the search form as the two parts of the page to clip, leaving out the rest of the page.

Page 28: Quick Start Guide Oracle Clipping Edition

26 KAPOW MASHUP SERVER QUICK START GUIDE

Step 11 – Show the Clip Click the icon to the right in the toolbar at the top of the RoboMaker Main Window. This will open the Portlet View and show the clip that you have defined:

Figure 14: The Modified Clip

Page 29: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 27

Step 12 – Make a Search Now, try out your portlet in the Portlet View by entering some text (e.g. “Kapow Technologies”) in the search field and clicking the “Google Search” button or hitting Enter.

Figure 15: Entering a Search Text

Page 30: Quick Start Guide Oracle Clipping Edition

28 KAPOW MASHUP SERVER QUICK START GUIDE

The Portlet View shows the search results as they will appear in your portlet:

Figure 16: The Search Results

Try performing a new search by clicking the icon to restart the clipping, entering another text, and clicking the search button again. Notice how the robot is being executed in the Main Window of RoboMaker as you are navigating in the Portlet View. For the first page, the clip branch that you have added will be executed. For the search results, the default clip branch will be executed.

Step 13 – Ensure the Correct Clip Branch is Used Make sure you are on the search results page in the Portlet View, by making a new search if necessary. Click on the small Google logo in the upper left corner to go back to the front page. Check whether the front page is clipped as you wanted it to be, with only the logo and the search form included.

Page 31: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 29

If not, this happens because the link back to the front page uses a different URL than the standard one (www.google.com) to get to the front page. To fix this, click the icon in the toolbar of the Portlet View. In the Edit Clip Wizard, select “Clip using other rules”:

Figure 17: Clipping Using another Clip Branch

Page 32: Quick Start Guide Oracle Clipping Edition

30 KAPOW MASHUP SERVER QUICK START GUIDE

Click the Next button. On the next page, select the clip branch that you want to use for this page – this is the clip branch that you added, and which is already selected by default:

Figure 18: Selecting the Clip Branch to Use

Click Finish. The Edit Clip Wizard will now configure the robot to ensure that the selected clip branch will be used for the page. As you can see in the Portlet View, the front page is now clipped as desired.

If you want to, verify this by making another search in the Portlet View, and clicking on the Google logo again on the results page to get back to the front page.

Step 14 – Save the Robot The robot is now complete, so save it by pressing the button in the toolbar. Name it Google.robot. Do not close RoboMaker yet.

The rest of this tutorial will show you how to deploy and run your clipping robot.

Page 33: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 31

Deploying the Clipping Robot from RoboMaker Now the clipping robot can be deployed. To do this you must have an installation of Oracle JDeveloper Studio 10g (version 10.1.3.3.0 or later) or 11g.

Note: The screenshots are for version 11g. JDeveloper 10g has a slightly different GUI but most of the steps are the same; the few substantial differences are explained.

Deployment consists of quite a few steps because you need to set up both a “producer” application and a “consumer” application in JDeveloper, define the connection between them, and deploy them to two Web servers.

Step 15 – Create a Portlet Producer Application in JDeveloper Launch JDeveloper. From the File menu select New. In the “New Gallery” dialog box select General | Applications in the left pane, then Application in the right pane:

Figure 19: New Gallery Dialog for Creating an Application

Click OK to open the “Create Application” dialog. Name the application “QuickStartProducer” and use the “WebCenter Application” template. Make a

Page 34: Quick Start Guide Oracle Clipping Edition

32 KAPOW MASHUP SERVER QUICK START GUIDE

note of the directory where the producer application will be created. You will need this information later:

Figure 20: Create Application Dialog for the Producer

Click OK to create the producer application. You may see a few warnings in the “Messages - Log” pane. These can be disregarded.

Page 35: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 33

Step 16 – Start the Oracle Clipping Wizard You can now deploy the clipping robot as a Java Portlet in the producer application. Go back to RoboMaker. If RoboMaker is no longer running, restart it and load GoogleClip.robot.

In the Clip menu, select Oracle Portal/WebCenter | Oracle Portal/WebCenter 10g/11g Clip Wizard. This will open the wizard displayed in Figure 21.

Browse to the folder where the producer application was created, and proceed to the public_html folder. The path should end with QuickStartProducer\ViewController\public_html as shown:

Figure 21: Oracle Portal/WebCenter Clipping Wizard

Click Next.

Page 36: Quick Start Guide Oracle Clipping Edition

34 KAPOW MASHUP SERVER QUICK START GUIDE

Step 17 – Choose Portlet Name In the following wizard page, you can enter a name for the portlet. Accept the suggested name “GoogleClip”:

Figure 22: Enter Portlet Name

Click Next.

Page 37: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 35

Step 18 – Finish the Wizard The remaining pages of the wizard contain advanced settings related to deployment. You can disregard these for now. Click Finish to make the wizard perform the requested operations.

When the wizard has completed, view a short summary of the process by clicking Details.

Figure 23: Details from the Wizard Execution

Click OK twice to close the two dialog boxes.

Additionally, we will show how to find the wizard-generated files in JDeveloper: In the Application Navigator pane, make sure the QuickStartProducer application is selected and unfold a few levels below its ViewController item. You may need to click the Refresh icon to see the following view:

Figure 24: Finding the Files Generated by Wizard

Page 38: Quick Start Guide Oracle Clipping Edition

36 KAPOW MASHUP SERVER QUICK START GUIDE

You will notice the two generated files portlet.xml and GoogleClip.clip. portlet.xml defines how to connect Oracle Clipping robots with portlets in general. GoogleClip.clip is a Deployment Descriptor file for the particular portlet that you have created. It contains the result of the various choices you made in the wizard.

Running the Clipping Robot In JDeveloper, there are quite a few things to set up to run the clipping robot.

Page 39: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 37

Step 20 – Start the Preconfigured Server Unless you have already done so, start the Preconfigured server in JDeveloper. You do this from the Tools menu choosing Start WebCenter Preconfigured OC4J. The first time, you will be asked to install it. Click Yes. A readme.html page will be displayed in JDeveloper. It contains a subsection titled “Default Ports” with a HTTP port number that you will need in step 23. In step 21, you will also need to enter the information from the section titled “Creating a Connection to the Preconfigured OC4J” into a wizard. You are recommended to print or copy the information or keep the stated sections within view.

Before you proceed, wait until a line stating “Oracle Containers for J2EE 11g (11.1.1.0.0) initialized” appears in the log pane titled “Start WebCenter Preconfigured OC4J - Log”.

Figure 25: The Preconfigured Server Has Been Started

Page 40: Quick Start Guide Oracle Clipping Edition

38 KAPOW MASHUP SERVER QUICK START GUIDE

The Preconfigured Server will eventually be responsible for running the clipping portlet and will make the portlet available over WSRP for inclusion on a Web page.

Step 21 – Define a Connection to the Preconfigured Server Open the File menu and select New. In the “New Gallery” dialog select General | Connections in the left pane and Application Server Connection in the right pane. Click OK to open the “Create Application Server Connection” wizard. Under Connection Name in the first step of this wizard, name the new connection “ConnectionToPreconfigured”:

Figure 26: First step of Creating a Connection

Page 41: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 39

Refer to the readme.html page that was displayed when the Preconfigured Server started. On this page, the section “Creating a Connection to the Preconfigured OC4J” contains step-by-step instructions on what to enter into the wizard.

In step 4, “Test”, of the wizard, click Test Connection. You should get the simple message “Success!” in the status field:

Figure 27: A Successful Connection

Page 42: Quick Start Guide Oracle Clipping Edition

40 KAPOW MASHUP SERVER QUICK START GUIDE

Click Finish to create the connection.

Step 22 – Create a Producer Deployment Profile In the Application Navigator pane, make sure the ViewController item under the QuickStartProducer application is selected. From the Run menu select Deploy, then New Deployment Profile…. In the “New Gallery” dialog box, select General | Deployment Profiles in the left pane and WAR File in the right pane. Click OK.

In the “Create Deployment Profile -- WAR file” dialog, name the new Deployment Profile “QuickStartDeployment” and click OK. In the “WAR Deployment Profile Properties” dialog box that appears, select Platform and set the Target Connection to “ConnectionToPreconfigured”:

Figure 28: Selecting the Target Connection

Page 43: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 41

If you are running JDeveloper 10g, skip the next paragraph and proceed to step 23 after clicking OK.

If you are using JDeveloper 11g, you first need to select File Groups | WEB-INF/lib | Contributors and check the items WebCenter IM and Presence Service and Portlet Runtime Client:

Figure 29: Deploying two Additional Standard Libraries

Click OK both in this dialog box and in the following “Project Properties” dialog box that appears.

Page 44: Quick Start Guide Oracle Clipping Edition

42 KAPOW MASHUP SERVER QUICK START GUIDE

Step 23 – Deploy the Portlet from the Producer Application The first part of this step differs depending on your JDeveloper version.

In JDeveloper 10g:

Unfold the hierarchy under ViewController, then Resources. Right-click the QuickStartDeployment.deploy item and select Deploy to ConnectionToPreconfigured as shown here:

Figure 30: Deployment in JDeveloper 10g

A “Configure Application” dialog box will then appear. Accept the default settings and click OK.

Page 45: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 43

In JDeveloper 11g:

In the Application Navigator pane, make sure the QuickStartProducer application is selected. Right-click its ViewController item and select Deploy, then QuickStartDeployment, then to and ConnectionToPreconfigured as shown here:

Figure 31: Deployment in JDeveloper 11g

Page 46: Quick Start Guide Oracle Clipping Edition

44 KAPOW MASHUP SERVER QUICK START GUIDE

You will be asked whether to deploy the portlet to an “Oracle Portlet Container 11.1.1.0 or above” (the exact version number may be different in your case). Select Yes and click OK. A “Deployment Plan” dialog will appear. Accept the default settings and click OK.

The following applies to both JDeveloper 10g and 11g:

Wait until the message “---- Deployment finished. ----” is displayed in the “Deployment - Log” pane.

Test the deployment by opening the following URL in a browser (replace the port number 6688 with the number you found in the readme.html page when the Preconfigured Server was started). Note: You must enter the URL in one line. Include the hyphen between “context” and “root”: http://localhost:6688/QuickStartProducer-ViewController-context-root/portlets/wsrp2?wsdl

You should get an XML page like the following that displays the WSRP service definitions for the portlet. (You will need this URL again in the following step.)

Figure 32: WSRP Service Definitions

Step 24 – Create a Portlet Consumer Application Create a simple web page in JDeveloper that the Clipping portlet can be displayed in.

Page 47: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 45

From the File menu, select New. In the “New Gallery” dialog box, select Applications in the left pane, then Application in the right pane. Click OK. In the “Create Application” dialog, name the application “QuickStartConsumer” and use the “WebCenter Application” template:

Figure 33: Create Application Dialog for the Consumer

Click OK to create the consumer application.

Page 48: Quick Start Guide Oracle Clipping Edition

46 KAPOW MASHUP SERVER QUICK START GUIDE

In the Application Navigator pane, make sure the new QuickStartConsumer application is selected Right-click its ViewController item and select New. In the “New Gallery” dialog, select Web Tier | JSF then JSF Page. (In JDeveloper 10g, select JSF JSP.)

Click OK to display the “Create JSF Page” dialog. Name the new page “Main.jspx”. In JDeveloper 10g, you need to select JSP Document (*.jspx). In JDeveloper 11g, this is done automaticaly once the file extension “jspx” is entered:

Figure 34: Create JSF Page Dialog

Click OK to create the page; it may take a little while.

Page 49: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 47

Step 25 – Create a Connection to the Portlet Producer Right-click the ViewController item within the QuickStartConsumer application and select New. In the “New Gallery” dialog, select Web Tier | Portlets in the left pane and WSRP Producer Registration in the right pane.

Click OK to display the “Register WSRP Portlet Producer” wizard. In step 2 of the wizard, name the new producer “WsrpPortletProducer”. In step 3, you must enter the same URL for the “URL Endpoint” that you entered into your browser when you tested the portlet deployment in step 23:

Figure 35: Registering a Producer Connection

Accept the default settings for the remaining input fields by clicking Next, then Finish.

Page 50: Quick Start Guide Oracle Clipping Edition

48 KAPOW MASHUP SERVER QUICK START GUIDE

Step 26 – Add the Portlet to the Consumer Application This step differs depending on your version of JDeveloper.

In JDeveloper 10g:

In the Component Palette in the right side of the screen, select the section WsrpPortletProducer. From this section, drag Google onto the editor for the Main.jspx page and drop it. This will add the portlet to the JSP page (it may take a little while):

Figure 36: Portlet Added in JDeveloper 10g

Page 51: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 49

In JDeveloper 11g:

In the Application Navigator pane in the left side of the screen, open the Application Resources section (by clicking its heading). Expanding the hierarchy under Connections, you will find WSRP Producer, then the new WsrpPortletProducer, and under it the Google portlet. Drag this portlet into the editor for the Main.jspx page and drop it. This will add the portlet to the JSP page (it may take a little while):

Figure 37: Portlet added in JDeveloper 11g

Step 27 – Start RoboServer RoboServer is the component that executes robots. It must be started before the Clipping robot can be run in the following step. On Windows system, RoboServer can be started from the Start Menu (it is found under “Runtime”). On all platforms, you can invoke the RoboServer executable file (found in the bin subfolder of the installation) with the command:

RoboServer –service socket:50000

This will start RoboServer listening on a socket at port 50000.

Page 52: Quick Start Guide Oracle Clipping Edition

50 KAPOW MASHUP SERVER QUICK START GUIDE

Step 28 – Test the Clipping Portlet You are now ready to start a Web server that displays the portlet. Within the QuickStartConsumer project, right-click the Main.jspx item and select Run:

Figure 38: Running the Consumer

Page 53: Quick Start Guide Oracle Clipping Edition

QUICK START TUTORIAL: CLIPPING 51

This starts the Web server and (after a while) launches the web page with the Google Clip portlet in your favorite browser. The clip will look as displayed in Figure 39.

Figure 39: The Clipping Portlet

Perform a search, and see how the results are presented in the portlet.

Summary This tutorial introduced you to clipping by building and running a simple clipping robot.

Next Steps For more information on using the wizards, refer to the online documentation for the wizards, or the Code Generation Guide.

For more information about clipping robots, see the “How to Clip” chapter in the RoboMaker User’s Guide.

You can also try the various tutorials found in the ModelMaker and RoboMaker User’s Guides, or view the recommended reading.

Page 54: Quick Start Guide Oracle Clipping Edition

52 KAPOW MASHUP SERVER QUICK START GUIDE

Page 55: Quick Start Guide Oracle Clipping Edition

INDEX 53

Index

A administrator guides, 13

ATOM, 7, 14

C clipping, 16

Edit Branch Wizard, 23

hiding tags, 25

Portlet View, 20

restricting links, 22

selecting tags to clip, 25

start URL, 19

using another clip branch, 30

Clipping Programmer's Guide, 12

Control Center, 11

Control Center User's Guide, 12

creating robots, 10

D deploying a clipping robot, 33

H HTML, 6

I installation, 5

Installation Guide, 13

J Java Programmer's Guide, 12

JavaScript, 6

JDeveloper Studio, 16, 33

JSR 168, 8

K Kapow Developer Connection, 5

Kapow Mashup Server, 6

KDC, 5

M managing robots, 11

ModelMaker, 10

ModelMaker User's Guide, 12

O object model, 9

objects, 9

Oracle

JDeveloper Studio, 16, 33

OC4J, 16

WebCenter, 16

WSRP, 8

Oracle Portal/WebCenter 10g/11g Clip Wizard, 35

P Portlet, 8, 16

portlet name, 36

Portlet View, 20

programmer guides, 12

R recommended reading, 13

Page 56: Quick Start Guide Oracle Clipping Edition

54 KAPOW MASHUP SERVER QUICK START GUIDE

advanced clipping, 14

clipping, 13

other uses than clipping, 14

REST, 7, 14

RoboMaker, 10, 17

RoboMaker User's Guide, 12

RoboManager, 11

RoboManager User's Guide, 12

RoboServer, 8, 11, 51

RoboServer User's Guide, 12

RoboSuite Code Generation Guide, 12

robot

clipping

creating a, 17

configuration, 22

saving a, 32

type, 18

Robot Configuration Window, 22

robots, 8

creating, 10

running, 11

RQL Service User's Guide, 13

RSS, 7, 14

running robots, 11

S SOAP, 7, 14

U user guides, 12

W Web Integration, 6

WebCenter, 16

WSRP, 8, 16, 40, 46