3 Deploying CPS as a WSRP Producer

This chapter provides information required for the deployment of Oracle Content Portlet Suite (CPS) as a WSRP producer. Once CPS is deployed, the portlets can be consumed from other WSRP-enabled portal servers. It covers the following topics:

Important:

User IDs on the content server must correspond with user IDs on your portal server.

3.1 Oracle WebCenter as Producer

This section provides information on the deployment of Content Portlet Suite (CPS) as a WSRP producer on Oracle WebCenter:

3.1.1 Installation Requirements

These servers and components are required for installation:

  • Oracle WebCenter 11g Release 1 with PS2 or higher (as producer)

  • Oracle Content Server 10g Release 3 or 11g Release 1

  • Oracle Content Portlet Suite (CPS) distribution file

3.1.2 Supported WSRP Consumers

These WSRP consumers are supported with Oracle WebCenter as producer:

3.1.3 Creating a Custom Managed Server

To create a new managed server, follow the steps in "Creating and Provisioning a WebLogic Managed Server Using a Jython Script" in the Oracle Fusion Middleware Administrator's Guide for Oracle WebCenter.

Note:

While modifying targetServer.properties, set serverType=Portlet and give a name to your server by setting the mgdServerName property; for example, mgdServerName=CPS_Portlet.

Targeting Libraries

The following libraries need to be targeted to the newly created managed server (for example, CPS_Portlet):

  • oracle-ridc-client-app-lib(10.3.2,10.3.2)

  • oracle-ucm-spi-app-lib(10.3.2,10.3.2)

  • p13n-app-lib-base(10.3.2,10.3.2)

  • vcr-app-lib(10.3.2,10.3.2)

  • oracle.webcenter.framework(11.1.1,11.1.1)

  • oracle.webcenter.spaces.fwk(11.1.1,11.1.1)

Follow these steps to target the libraries:

  1. Go to the WebLogic Server Administration Console of your WebCenter instance, and then open the Deployments section.

  2. Click on the library name you want to target; for example, oracle.webcenter.framework(11.1.1,11.1.1).

  3. On the settings page for the selected library, open the Targets tab.

  4. Select the option for the newly created server (for example, CPS_Portlet) and then save and activate the changes.

  5. Repeat this for each of the libraries to be targeted.

Targeting Data Sources

Target the mds-SpacesDS data source to the newly created managed server (for example, CPS_Portlet):

  1. Go to the WebLogic Server Administration Console of your WebCenter instance. In the Domain Structure window, choose Services, then JDBC, and then Data Sources.

  2. In the Summary of JDBC Data Sources section, click mds-SpacesDS.

  3. On the settings page for mds-SpacesDS, open the Targets tab.

  4. Select the option for the newly created server (for example, CPS_Portlet) and then save and activate the changes.

3.1.4 Deploying CPS Portlets on WebCenter

This section describes how to configure WebCenter as a producer using Web Services Remote Portlets (WSRP) for CPS.

Deploying the EAR File

  1. Uncompress the CPS distribution file and extract the WebCenter CPS zip file to your local directory.

  2. Launch the WebLogic Server Admin Console of your WebCenter instance.

  3. Click Lock and Edit.

  4. In the Domain Structure section, click Deployments.

  5. In the Summary of Deployments section, open the Control tab and click Install.

  6. In the Install Application Assistant section, click the Upload your file(s) link.

  7. In the Deployment Archive section, click the Browse button.

  8. Browse to the /portlets directory of the extracted WebCenter CPS zip file and select the StellentPortlets.ear file.

  9. Click Next.

  10. The CPS EAR file is uploaded and displays in the list of available files.

  11. Enable the option button corresponding to the CPS EAR file.

  12. Click Next.

  13. Select the Install this deployment as an application option.

  14. Click Next.

  15. Select the new custom managed server that you created in "Creating a Custom Managed Server" (for example, CPS_Portlet).

  16. Click Finish to deploy the application.

  17. Access the WSDL URL:

    http://Host_Name:Port/cps/portlets/wsrp1?wsdl
    

Registering your WSDL

  1. From a command-line, launch the WebLogic Scripting Tool (WLST), for example:

    WLS-HOME/as11r1wc/common/bin/wlst.sh
    

    Note:

    The WebLogic Scripting Tool (WLST) is a command-line scripting environment that you can use to create, manage, and monitor WebLogic Server domains. Refer to the Oracle Fusion Middleware Oracle WebLogic Scripting Tool document for more information.
  2. After the WebLogic Scripting Tool initializes, type connect() and press Enter.

  3. You are prompted to enter the username, password and Admin server URL. Enter these values and press Enter.

  4. Once connected to the server, run the following command to register your WSDL:

    registerWSRPProducer('webcenter','Provide_Any_Name_for_WSDL_Handle','Your_WSDL>',timeout=500)
    

    For example:

    registerWSRPProducer('webcenter','StellentWSRP','http://Host_Name:Port/cps/portlets/wsrp1?WSDL',timeout=500)
    

Referencing Your Content Server

The following WLST commands should be used to create, delete, and reset an Oracle Content Server connection:

Note:

The custom managed server on which CPS is deployed and the WLS_Spaces server must be restarted after executing the following commands for the changes to take effect.
  • Run the following WLST command to create an Oracle Content Server connection:

    createJCRContentServerConnection('CPS_Application_Name', 'CSConnection', socketType='socket', serverHost='Content_Server_Host', serverPort='Content_Server_Port')
    

    For example (if the CPS application name is StellentPortlets):

    createJCRContentServerConnection('StellentPortlets', 'CSConnection', socketType='socket', serverHost='192.0.2.250', serverPort='4444')
    
  • Run the following WLST command to delete an Oracle Content Server connection:

    deleteConnection(appName='CPS_Application_Name', name='CSConnection')
    
  • Run the following WLST command to reset an existing Oracle Content Server connection:

    setJCRContentServerConnection('CPS_Application_Name', 'CSConnection', socketType='socket', serverHost='New_Content_Server_Host', serverPort='New_Content_Server_Port')
    
  • Run the following WLST command to list the existing Oracle Content Server connections:

    listJCRContentServerConnections(appName='CPS_Application_Name')
    

Enable Your Content Server to Communicate with CPS

You must enable your content server instance to communicate with CPS. See "Configuring Oracle Content Server for CPS Communication" for instructions.

3.2 Oracle WebLogic Portal as Producer

This section provides information on the deployment of Content Portlet Suite (CPS) as a WSRP producer on Oracle WebLogic Portal.

3.2.1 Installation Requirements

These servers and components are required for installation:

  • Oracle WebLogic Portal 10g Release 3 (as producer)

  • Oracle Content Server 10g Release 3 or 11g Release 1

  • Oracle Content Portlet Suite (CPS) distribution file

3.2.2 Supported WSRP Consumers

These WSRP consumers are supported with Oracle WebLogic Portal as producer:

3.2.3 Deploying CPS Portlets on WebLogic Portal

This section describes how to configure WebLogic Portal as a producer using Web Services Remote Portlets (WSRP) for CPS.

Important:

Before deploying CPS portlets, select an existing WebLogic domain or create a new WebLogic domain (for example, cps_domain). You must configure this domain to support WebLogic Server, Workshop for WebLogic, and WebLogic Portal.

Reference Your Content Server

  1. Uncompress the CPS distribution file and extract the WebLogic CPS zip file to your local directory.

  2. Locate the /WEB-INF/config directory.

  3. Open the cps-initialization.properties file in a text-only editor. Edit the host property value to reference the IP address or host name of your content server instance. Edit the port property value if your content server is running on a port other than the default port of 4444. Do not remove the new line character at the beginning of the file.

    For example:

    Host=192.0.2.254
    Port=4448
    

Create a Portal Web Project

  1. Launch Workshop for WebLogic.

  2. Select File, then New, and then Project.

  3. In the New Project dialog, expand the WebLogic Portal node.

  4. Select Portal Web Project.

  5. Click Next.

    The New Portal Web Project wizard displays.

  6. In the Create a New Oracle WebLogic Portal Web Project step, enter a project name (for example, CPS).

  7. Click Finish.

  8. If the Open Associated Perspective dialog displays, click Yes.

Create a Portal EAR Project

  1. In Workshop for WebLogic, select File, then New, and then Project.

  2. In the New Project dialog, expand the WebLogic Portal node.

  3. Click Portal EAR Project.

  4. Click Next.

    The New Portal EAR Project wizard displays.

  5. In the Create a New Oracle WebLogic Portal EAR Project step, enter a project name (for example, CPS Consumer-EAR).

  6. Click Next.

  7. In the Project Facets step, select WebLogic Portal EAR Project Facets from the drop-down list.

  8. Click Next.

  9. In the J2EE Modules to Add to the EAR step, select the portal web project you created (for example, CPS).

  10. Click Finish.

  11. If the Open Associated Perspective dialog displays, click Yes.

Import the CPS Portlets

  1. Select Project Explorer view and expand the new Portal Web Project node (for example, CPS).

  2. Right-click the WebContent node, and select Import.

    The Import wizard displays.

  3. In the Select an Import Source step, expand the General node.

  4. Select File System.

  5. Click Next.

  6. In the File System step, click Browse associated with the From Directory field.

  7. Browse to the /portlets directory of the uncompressed CPS distribution file and click OK.

  8. In the Import Resources from Local File System step, enable the portlets option.

  9. Click Finish.

  10. If prompted to overwrite Manifest.MF file, click Yes.

  11. After the portlets folder is imported, you might notice several errors in the web project. Error files are shown with a red cross prefixed with the file in Project Explorer view. Select the files showing errors and delete them.

Publish the EAR File

  1. In Workshop for WebLogic, select Servers view.

  2. Right-click in Servers view, click New, then Server.

    The New Server wizard displays.

  3. In the Choose Type of Server to Create step, accept the default settings and click Next.

  4. In the Specify a WebLogic Domain Directory step, click Browse.

  5. Browse to the new CPS domain directory and click OK.

    For example:

    C:/oracle_weblogic/user_projects/domains/cps_domain
    
  6. Click Next.

  7. In the Add and Remove Projects step, select the CPS EAR file from the Available Projects section and click Add to add it to Configured Projects.

  8. Click Finish.

  9. In Servers view, right-click on the new server and select Publish to start the server and publish the EAR file.

  10. The WSRP-enabled CPS portlets are available via the WSDL URL.

    The URL will be of the format:

    http://hostserver:hostport/context-root-specified-in-portal-web-project/
    producer?wsdl
    

    Where hostserver, hostport, and context-root-specified-in-portal-web-project is replaced with appropriate values.

Enable Your Content Server to Communicate with CPS

You must enable your content server instance to communicate with CPS. See "Configuring Oracle Content Server for CPS Communication" for instructions.

3.3 IBM WebSphere Portal as Producer

This section provides information on the deployment of Content Portlet Suite (CPS) as a WSRP producer on IBM WebSphere Portal.

3.3.1 Installation Requirements

These servers and components are required for installation:

  • IBM WebSphere Portal Version 6.1 (as producer)

  • Oracle Content Server 10g Release 3 or 11g Release 1

  • Oracle Content Portlet Suite (CPS) distribution file

3.3.2 Supported WSRP Consumers

These WSRP consumers are supported with IBM WebSphere Portal as producer:

3.3.3 Deploying CPS Portlets on WebSphere Portal

This section describes how to configure WebSphere Portal as a producer using Web Services Remote Portlets (WSRP) for CPS.

Deploy the EAR File

  1. Uncompress the CPS distribution file and extract the WebSphere CPS zip file to your local directory.

  2. Start the server and launch WebSphere Portal.

  3. From the main menu, click Administration.

  4. In the Portlet Administration section, click Web Modules.

  5. In the Manage Web Modules section, click Install.

  6. Browse to the /portlets directory of the extracted WebSphere CPS zip file and select the StellentPortlets.ear file.

  7. Click Next.

  8. Provide an enterprise application display name and context root.

  9. Make sure the Start Application option is enabled (default).

  10. Click Finish.

    A confirmation message will display in the Manage Web Modules section after successful installation.

Reference Your Content Server

  1. Locate the StellentPortlets WEB-INF/config directory:

    WebSphere_Portal_Home\wp_profile\installedApps\Node_Name\CPS_App_Display_Name\StellentPortlets.war\WEB-INF\config
    
  2. Open the cps-initialization.properties file in a text-only editor. Edit the host and port properties to reference your content server instance.

    For example:

    Host=192.0.2.254
    Port=4448
    
  3. Stop and restart the server.

Locate the CPS Portlets

  1. Launch WebSphere Portal and click Administration from the main menu.

  2. In the Portlet Management section, click Portlets.

  3. Search for the CPS portlets in the list of available portlets.

Assign Resource Permissions

For each of the CPS portlets perform the following steps:

  1. Click the Provide Portlet icon.

  2. Click OK.

  3. Click the Assign Access to Portlet icon.

    The Resource Permissions page displays.

  4. In the Roles column, click the Edit Role icon for the User role.

  5. Click Add.

  6. Enable the Anonymous Portal User option.

  7. Click OK.

  8. In the Add section, click the portlet name.

  9. Repeat the steps above for the Privileged User role: click the Edit Role icon, click Add, enable the Anonymous Portal User option, and click OK.

  10. When you have completed these steps for each of the CPS portlets, click Done.

Create the Producer

  1. In the Portlet Management section, click Web Services.

  2. Click New Producer and provide a title for the producer. Select this Web Service Producer when consuming the CPS portlets. See "Oracle WebLogic Portal as Consumer" and "Consumption Steps" for more information.

  3. Confirm that the entries for your configuration are correct:

    • Review the URL to WSDL Service Definitions field and edit as needed.

    • Review the host name. The default host name is localhost. It is recommended that the IP address or machine name be used.

    • Review the port number. The default port number is 10040. The port number should match the port where your WebSphere Portal is deployed (as displayed in the address bar of your web browser).

  4. After you have confirmed your entries, click Next.

  5. Click Next.

    The confirmation message, "Created the Producer successfully" displays.

  6. The WSDL for your producer is:

    Host_Name:Port/wps/wsdl/service.wsdl
    

    For example:

    http://localhost:10039/wps/wsdl/service.wsd
    

Enable Your Content Server to Communicate with CPS

You must enable your content server instance to communicate with CPS. See "Configuring Oracle Content Server for CPS Communication" for instructions.

3.4 Configuring Oracle Content Server for CPS Communication

To enable your content server instance to communicate with CPS, you must define the IP address of your portal server and add an additional configuration variable to define the port used by CPS.

This section covers the following topics:

3.4.1 Enabling the IP Address on Content Server

You must enable the IP address of the application server. This enables the content server to listen for connections from the application server.

  1. Launch the System Properties editor.

    Select Content Server, then instance name, then Utilities, and then System Properties.

  2. Open the Server tab.

  3. Enter your application server specific information for the Hostname Filter and IP Address Filter.

    The wildcard (*) is accepted, but IP addresses must take the form x.x.x.x regardless of wildcards, and must be separated by a vertical bar.

    For example:

    12.34.56.*|12.34.57.*|12.35.*.*
    
  4. You must restart the content server for these changes to take effect.

3.4.2 Editing the Configuration File for Content Server

You must edit the content server configuration file (config.cfg) to include the IntradocServerPort configuration variable and the port number. This entry is present by default in Oracle Content Server 10g but must be added to the configuration file for Oracle Content Server 11g.

Follow these steps to add the IntradocServerPort entry to the configuration file:

  1. Launch the Content Admin Server.

  2. Click General Configuration.

  3. In the Additional Configuration Variables field, add IntradocServerPort entry and the port number.

    For example:

    IntradocServerPort=4444
    
  4. Click Save.

  5. Click Start/Stop Content Server.

  6. Restart the content server.