Oracle Application Server Portal Developer Kit (PDK)
Installing the PDK-URL
Services External Application Sample Portlets
| Last Updated: |
December 15, 2003 |
| Status: |
Production |
| Version: |
PDK Release 9.0.4 |
Overview
Welcome to PDK-URL Services. Now that you have successfully installed
the PDK-Java Framework and samples, you may want to create URL-based portlets.
Note: PDK-URL Services enables you to expose content from
external websites as portlets using a manual, XML file-based approach. However,
if you are targeting your provider to be registered with OracleAS Portal 9.0.2
or later, the recommended approach to perform the same task is to use the Web
Clipping Portlet. To find out about using Web Clipping or how to migrate
your URL-based portlet to Web Clipping, go to the OmniPortlet
and Web Clipping area of Portal Center.
This article describes how to install and configure the PDK-URL Services external
application authentication sample. This sample uses form-based authentication
(not basic authentication) to authenticate against an external application.
There are two portlets in the PDK-URL Services external application sample:
- Yahoo! Finance
- Yahoo! Mail
The PDK-URL services external application sample provider is pre-configured
within jpdk.ear, with a service ID of urn:urlexternalauth.
Minimum Requirements
- OracleAS Portal 3.0.8.9.8 or later.
- PDK-Java 9.0.4.
Assumptions
- You have already successfully installed the PDK-Java Framework and samples
by following the Installing
the PDK-Java Framework and Samples article. These samples use the PDK-Java
Framework.
- You have an account with Yahoo! To register go to http://my.yahoo.com.
Configuring and Testing the Sample Provider
The PDK-URL Services external application sample provider has been pre-configured
within the jpdk.ear. However, you may need to change the provider.xml
file to specify the proxy server you use. Open the provider.xml file
for the sample (it should be located in the WEB-INF/providers/urlexternalauth
directory) and provide appropriate replacement values for the following tags:
<proxyInfo class="oracle.portal.provider.v2.ProxyInformation">
<httpProxyHost>www-proxy.us.oracle.com</httpProxyHost>
<httpProxyPort>80</httpProxyPort>
</proxyInfo>
Next, you can test that the sample is properly configured with OC4J.
- Start the OC4J instance in which PDK-URL Services is installed. Note:
This sample relies on PDK-URL Services being able to communicate through an
HTTPS-based URL, and thus requires the Oracle SSL native libraries to be available
to your OC4J instance in the system path. If you are running the sample on
an OC4J instance within an Oracle AS mid tier, this should have been set up
automatically. However, if you are running this sample on OC4J standalone,
you have to make sure you have set your PATH or
LD_LIBRARY_PATH environment variable appropriately
before starting OC4J. This can be achieved with the commands below (which
assume that OC4J_HOME points to your standalone
OC4J installation root and IAS_HOME points to an
oracle installation where the SSL binaries are available in the bin directory,
e.g. an Oracle AS Portal mid tier).
- In Windows Command Prompt:
set PATH=%IAS_HOME%\bin;%PATH%
cd %OC4J_HOME%\j2ee\home
start java -server -Xmx256m -jar oc4j.jar
- In Unix/Linux Bourne Shell (sh):
LD_LIBRARY_PATH=$IAS_HOME/bin:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
cd $OC4J_HOME/j2ee/home
java -server -Xmx256m -jar oc4j.jar &
- Execute the external application sample provider servlet from OC4J.
For example: http://myserver.mydomain.com:port/jpdk/providers/urlexternalauth
- Review the content of the test page displayed. If you did not receive the
test page, verify that you can execute standard servlets using OracleAS.
Registering Your Provider
Before registering your external application provider with the portal, you
must create an external application for the provider to map to.
- Log into OracleAS Portal as
- SSO Administrator for portal 3.0.9, 9.0.2.X
- Oracle Internet Directory super user (e.g. orcladmin) for Oracle Aplication
Server Portal 10g
- On the Portal sub-tab of the Administer tab on the
Builder page, click on Administer External Applications
within the portlet called SSO Server Administration.
- Enter the appropriate information for Yahoo!.
- Application Name: Yahoo!
- Login URL: http://login.yahoo.com/config/login
- User Name/ID Field Name: login
- Password Field Name: passwd
- Type of Authentication Used: POST
- Click OK.
You must now register the provider with OracleAS Portal.
- On the Portlets sub-tab of the Administer tab on
the Builder page, click on Register a Provider within
the portlet called Remote Providers.
- Enter Provider information for the Sample.
- Name: URL_External_App_Sample
- Display Name: PDK-URL Services External App Sample
- Timeout: 300
- Implementation Style: Web
- URL: http://myhost.com:8888/jpdk/providers
(if you're using OracleAS Portal 3.0.9, append the service id, urlexternalauth,
to the URL)
- Service Id: urn:urlexternalauth
- Select the option "The user's identity needs to be mapped to a
different name in the Web provider's application, and/or the Web provider
requires an external application login for establishment of a browser session".
- Populate the External Application ID field by browsing
to the Yahoo! external application you registered above.
- Choose a Login Frequency of Once Per User Session.
- Click Finish.
Adding Your Portlet to a Page
Add the PDK-URL Services external application sample portlets to a page. The
portlets will be listed under the Provider called "PDK-URL Services External
App Sample". The first time you display the portlets as particular user,
they will display a link requesting you to update the login information for
the external application. This login information will be remembered for subsequent
visits to the portlets.
You have now successfully installed and setup the PDK-URL Services external
application sample portlets.
| Revision History: |
| Revision No |
Last Update |
Description |
| 1.0 |
March, 2002 |
Created |
| 1.1 |
August 10, 2003 |
Revised branding and applied PDK Stylesheet |
| 1.2 |
December 15, 2003 |
Added Web Clipping note and corrected registration
information |
|