Technical Note: Web Services for Remote Portlets for Sun Java System Portal Server 7.1

Administering WSRP Producers for Portal Server

Create a producer if you want to offer locally deployed portlets remotely to other portals that act as WSRP consumers. A portal can host multiple producers and each producer can export multiple remote portlets. A producer is a grouping mechanism that exports any number of portlets. The consumer can consume remote portlets offered by a producer. Based on the portlets that you want to provide to WSRP consumers, you can create one or more producers. A producer might require consumers to register with it. Registration is a process in which the consumer and the producer enter into a relationship that enables the producer to identify the consumer. A producer either supports registration or it does not support registration. If a producer supports registration, consumers must register to work with the producer. If a producer does not support registration, it is referred to as a registration-less producer and does not require registration.

This section contains the following tasks that need to be performed at Portal Server producer to offer locally deployed portlets to a consumer:

Task 

Description 

Instruction 

1. Create a producer that supports registration if you want the consumer to customize the remote portlets. Select the registration mechanism based on the communication that you want to have with the consumer: in-band registration or out-of-band registration. 

If the producer requires registration and enabled in-band registration: The consumer can provide the details required by the producer through the WSRP interface and register with the producer. The registration happens during the consumer creation. The consumer provides the attributes requested by the producer and submits the attributes. This communication is called in-band communication, because the communication happens through the WSRP protocol. Consumer is also provided an option to register through out-of-band communication. The administrator of the consumer contacts the administrator of the producer and obtains a registration handle. A registration handle is a string representation of the consumer-producer relationship. This communication is called out-of-band communication because the communication is not through the WSRP protocol.

If the producer requires registration and enabled out-of-band registration: Out-of-band registration happens with manual intervention such as phone calls, e-mails, and so on. For a producer that supports out-of-band registration, the producer gets the details about the consumer through out-of-band communication, and the producer creates a registration handle for the consumer that the consumer uses for further communication with the producer. The registration handle is communicated to the consumer through out-of-band communication. For more information on creating a registration handle, see To Generate a Registration Handle.

To Create a Producer That Supports Registration

2. Create a producer that does not support registration if you do not want the consumer to customize the remote portlets. 

For a producer that does not support registration, a consumer is not required to enter any information or get any information through out-of-band communication. The consumer can not customize or edit the portlets offered by the producer. The producer that does not support registration provides read-only portlets to the consumers. 

To Create a Producer That Does Not Support Registration

3. Publish locally deployed portlets to the producer and enable the producer so that the consumer can access the locally deployed portlets as remote portlets. 

A newly created producer by default is disabled because it does not export any local portlet as a remote portlet. It should be enabled for a consumer to register. A producer must be enabled by exporting one or more portlets as a remote portlet. 

A producer can be disabled at any point. All of the consumers registered with the disabled producer will not be able to access the portlets offered by the producer. 

To Publish Portlets and Enable a Producer

4. (Optional) Generate a registration handle if the newly created producer supports only out-of-band communication for registration. 

A registration handle is a unique representation of the consumer-producer relationship that is formed during the registration process. 

  • If producer supports only out-of-band registration, you must generate a registration handle.

  • If producer supports in-band registration, you are not required to generate a registration handle.

For a producer that supports out-of-band registration, the registration handle must be generated for a specific consumer. After you generate the registration handle, it needs to be communicated to the consumer through out-of-band communications, such as e-mails and phone calls. Consumer needs to enter the registration handle while registering with the producer. For more information on how to register with a producer using the registration handle, see To Add a Configured Producer.

To Generate a Registration Handle

5. (Optional) Publish the details of the newly created producer if you want to make the producer discoverable through a search by the consumer. 

Publishing a producer stores producer details in a repository, such as Service Registry available with Sun Java Enterprise System or ebXml Registry Server allows a consumer to search for a producer details, such as producer name, portlets, WSDL url, and organization using the application interface or using the command-line interface, so that the consumer is aware of the producers that offer remote portlets to it. 

To Configure Portal Server to Use Service Registry

6. (Optional) Configure Portal Server to use Service Registry if the Service Registry is deployed on a different network. 

If Portal Server and Service Registry are on different networks in your deployment, must configure Portal Server to use Service Registry to publish producer details. For details on setting up Service Registry Server, refer to Service Registry 3.1 Administration Guide

To Configure Portal Server to Use Service Registry

7. (Optional) Search for a producer details using the command-line interface. 

After a producer details are published, a consumer can search for the details of the producer using the application interface or using the command-line interface. 

Searching a producer details allows the consumer to discover the WSDL url of a producer based on the organization, description, or portlets. 

To Search for a Producer Details

ProcedureTo Navigate to the WSRP Producer Options in the Portal Server Administration Console

  1. Log in to the Portal Server administration console.

  2. In the Portal Server administration console, click the Portal tab.

    The screen displays available portals.

  3. Click the portal name hyperlink.

  4. Click the WSRP tab.

  5. Click Producer tab.

ProcedureTo Create a Producer That Supports Registration

  1. If you are not on the Producer tab, see To Navigate to the WSRP Producer Options in the Portal Server Administration Console.

  2. Select the organization's DN (distinguished name) where you want to create a producer and click the Producer tab.

    Each organization can offer any number of WSRP producers. The WSRP Producers table displays all producers that already exist. Select the DN of an organization or sub-organization based on the availability of portlets.


    Note –

    Organizations are created in Sun Java System Identity Server.


  3. Click New to create a new producer.

  4. Type a name to identify the producer.

    The name of the producer should be unique and should contain valid characters. The producer name is used to create the WSDL (Web Services Definition Language) URL of this producer.

  5. Select Required for Registration to create a producer that supports registration.

    If a producer does not support registration, it can not identify the consumer because the producer does not build a relationship with the consumer. Hence the consumer can not customize the portlets that are offered by the producer. Select Support Registration if you want the producer to support customization of portlets.

  6. Select Supported for Inband Registration if you want the consumer to enter the details using Portal Server application interface.

  7. To add a registration property, click Add Row. Enter the values. Enter the name of the registration property and description.

    Registration properties are the details that you want to get from the consumer while the consumer registers to a specific producer. The registration properties entered by the consumer can be validated through the Registration Validation class.

  8. Select Supported for out-of-band Registration if you want the consumer to provide the details through out-of-band communication, such as phone calls, e-mails, and so on.

  9. Click Next.

    The Review screen displays the details that you entered. Review the details. You can click Previous and change the details you entered.

  10. Click Finish to create the producer.

ProcedureTo Create a Producer That Does Not Support Registration

  1. If you are not on the Producer tab, see To Navigate to the WSRP Producer Options in the Portal Server Administration Console.

  2. Select DN.

    The WSRP Producers table displays all producers that are already configured.

  3. Click New to create a new producer.

  4. Type a name to identify the producer.

    The name of the producer should be unique and should contain valid characters. The producer name is used to create the WSDL (Web Services Definition Language) URL of this producer.

  5. Select Registration Not Required.

  6. Click Finish.

ProcedureTo Publish Portlets and Enable a Producer

  1. If you are not on the Producer tab, see To Navigate to the WSRP Producer Options in the Portal Server Administration Console.

  2. In the Producer tab, click the producer name hyperlink.

    The Edit Properties screen appears. The screen displays the WSDL URL, which is a unique URL for a specific producer through which the consumer accesses the producer.

  3. Add one or more published portlets to the producer.

    The Unpublished Portlet list displays a list of local portlets that are available in the system and can be exported as remote portlets.


    Note –

    The producer must have at least one published portlet to enable it.


  4. Select a portlet, and click Add to add the portlets to the producer.

  5. Edit the Registration Validation Class field if you want to validate the registration properties.

    The Registration Validator class is used to validate the registration properties that are entered by the consumer.

    You can customize the RegistrationValidator class. Using this class, you can process the registration properties, for example, verifying the zip code of the consumer. RegistrationValidator is the SPI for registration validation in the WSRP producer. For more information on customizing the validation class, see http://server/portal/javadocs/desktop. You can also refer to Chapter 14, WSRP: Validating Registration Data, in Sun Java System Portal Server 7 Developer’s Guide.

  6. Click Save to save the changes and edit the Enable check box.

  7. Select Enable to enable the producer and click Save.

ProcedureTo Generate a Registration Handle

  1. If you are not on the Producer tab, see To Navigate to the WSRP Producer Options in the Portal Server Administration Console.

  2. Click the producer name for which you want to create a registration handle.

  3. Click the Consumer Registration tab.

    The screen displays all consumers that are registered to the specific producer.

  4. Click New create a new registration handle.

  5. Type details, such as name, status, consumer agent, and method.

    • Consumer name: A unique name to identify the consumer.

    • Status: A consumer can be Enabled or Disabled. A consumer can access the remote portlets offered by the producer only if the status is enabled.

    • Consumer Agent: Specifies the name and version of the consumer's vendor. Type the Consumer Agent Name in the form ProductName.MajorVersion.MinorVersion, where ProductName identifies the product the consumer installed for its deployment, and MajorVersion and MinorVersion are vendor-defined versions of the vendor's product. This string can contain any additional characters and words the product or consumer wants to supply.

    • Method: Specifies whether the Consumer has implemented portlet URLs in a manner that supports HTML markup containing forms with the get method.

  6. Click Next.

    The screen displays the registration property values that you specified while creating the producer. Review the details and change the details if required.

  7. Click Finish to create a registration handle.

ProcedureTo Publish Producer Details to the Service Registry

  1. Create an organization data and a producer data file that include the organization and producer details to publish to the service registry.

    The organization data file can contain the following entries:

    org.name=organization-name

    org.description=organization-description

    org.primarycontact.name=contact-name

    org.primarycontact.phoneno=telephone-number

    org.primarycontact.email=email-address


    Note –

    The org.name and org.description entries must be the same as the entries used in Identity Server unless the Service Registry is deployed internally.


    The producer data file should have the following entries:

    producer.name=producer-name

    producer.description=producer-description

    producer.id=producer-ID


    Note –

    To be able to search for the details of producer, organization, or portlet, you must create at least one data file associated with.


  2. Stop and restart the common agent container using the following commands:

    /opt/SUNWcacao/bin/cacaoadm stop

    /opt/SUNWcacao/bin/cacaoadm start

  3. To publish the producer details to the Service Registry, use the following command:

    ./psadmin publish-registry -u amadmin -f password-file -p portal1 -m producer -U producer-data-filename -O organization-data-filename -T portlet-file -L --debug


    Note –

    The portlet-file file specifies the portlets that are offered by the WSRP producer. Type the portlets list is specified as a string within double quotes and elements separated by a space, for example, "NotepadPortlet BookmarkPortlet WeatherPortlet".


    You can check the log file by using the following command:

    more var/opt/SUNWportal/logs/admin/portal.admin.cli.0.0.log


    Note –

    For more information on the psadmin publish-registry commands, refer to psadmin publish-registry in Sun Java System Portal Server 7 Command-Line Reference.


ProcedureTo Configure Portal Server to Use Service Registry

  1. On the machine where Portal Server is installed, create the directory, /soar/3.0/jaxr-ebxml/security.

  2. Copy keystore.jks from Registry Server's /var/opt/SUNWsrvc-registry/3.0/data/security directory to the /soar/3.0/jaxr-ebxml/security directory.

  3. In the Sun Java System Portal Server Portal Server administration console, click the Portal tab. Click the SSO Adapter tab.

  4. Click JES-REGISTRY-SERVER.

    The Edit Meta-adapter - JES-REGISTRY-SERVER screen appears.

  5. Type the following details.

    If you are accessing Service Registry through a proxy server, type the following details:

    • http.proxy.host: The host name of the proxy server.

    • http.proxy.password: The proxy password if proxy server required authentication.

    • http.proxy.port: The port on which proxy server is available.

    • http.proxy.user: The proxy username if proxy server required authentication.

    If you do not use a proxy server, type the following information:

    • registry.keypassword: The password that is required to get the key from the keystore.

    • registry.keystorealias: The key alias that is present in the keystore that is to be used for authenticating with the registry server.

    • registry.keystorelocation: The location of the keystore relative to the /soar/3.0/jaxr-ebxml directory.

    • registry.keystorepassword: The password used to open the keystore.

    • registry.publishurl: The URL of the registry server where the publish request should be sent should accept SOAP requests.

    • registry.queryurl: The URL of the registry server where the search request should be sent should accept SOAP requests.

  6. In Access Manager, add SSO Adapter Service to the Access Manager administrator.

ProcedureTo Search for a Producer Details

  1. Create a search producer data file that contains the details that you want to search.

    Search Producer data file can contain any of the following:

    producer.name=producer-name

    producer.description=producer-description


    Note –

    The search producer data file contains a description of the producer in the registry. Use the percentage sign (%) for a wildcard search. For example, %acme% in producer-name searches for a WSRP producer that contains the string "acme" in its name.


  2. To search for a producer in the registry, use the following command:

    ./psadmin search-registry -m consumer -u amadmin -f ps-password -C search-producer-datafile -p portal1