Sun GlassFish Web Space Server 10.0 Administration Guide

WSRP Administration

The WSRP Producer Admin and WSRP Consumer Admin portlets provide WSRP Administration functionality. Generally, in any real life scenario, WSRP Producer and WSRP Consumer are on different machines, with WSRP Consumer running on a remote machine. To keep it simple, you can use the WSRP Producer and the WSRP Consumer from a single Web Space Server installation. The following topics cover different functions of WSRP administration.

Creating a WSRP Producer

You use the WSRP producer to create and manage WSRP Producers.

What Is a WSRP Producer?

A WSRP producer offers locally deployed portlets for remote deployment. A remotely deployed WSRP consumer can connect to the producer, and can use the portlets offered by the producer.

A portal can host multiple producers. The consumer can import remote portlets offered by a producer. You can create one or more producers. A producer can optionally require registration. If a producer supports registration, then consumers must register to work with the producer.

Inband and Outband Registration

Registration is used to build a technical or business relationship between the consumer and the producer. While creating a producer, you can define any one of the following registration mechanisms: Inband registration or Outband registration.

If the producer requires registration and enabled for Inband registration, the consumer can provide the details through WSRP interface and register with the producer. The consumer also has an option to provide the registration handle obtained through Outband communication.

If the producer requires registration and is enabled for Outband registration, the consumer should obtain the registration handle through Outband communication and provide the registration handle during registration. Outband registration happens with manual intervention such as phone calls, email, and so on. For a producer that supports Outband registration, the producer gets the details about the consumer through Outband communication, and it creates a registration handle for the consumer. The registration handle is communicated to the consumer through Outband communication.

Producers Without Registration

For a producer that does not require registration, the consumer is not required to type any information or get any information through Outband communication. In this case, the consumer cannot customize or edit the portlets offered by the producer. The producer that does not support registration provides read-only portals to the consumers.

ProcedureTo Create and Enable a WSRP Producer

  1. Log in to Web Space Server as the admin user.

  2. Navigate to Control Panel -> Server -> WSRP Producer from the Welcome menu.

  3. Click the Add Producer button.

  4. Type a name for the Producer.

    For example, you can create a Producer called NewProducer. This screen also provides option to export a version of WSRP service (choose both 1.0 and 2.0) for exporting both version 1.0 and version 2.0 service.


    Note –

    The name of the producer or a consumer must not contain empty spaces or any special characters.


    Figure 7–1 Creating a New WSRP Producer

    Creating a New WSRP Producer

  5. Click Save.

    The Producer is created, but is disabled by default.

  6. To enable the WSRP Producer:

    1. Click the link for a selected producer.

      In this example, click the NewProducer link. The producer is displayed.

    2. Move some portlets from the Unpublished list to the Published list.

    3. Click Save.

      The producer is saved.

    4. Click the Disabled link.

      The producer is displayed again.

    5. Select Enabled from the Status list and click Save.

      The producer is enabled.


    Note –

    By default, the newly created WSRP producer exports both WSRP version 1.0 and WSRP version 2.0 services in the exported WSDL. On checking the WSDL URL, you should see both version 1.0 and version 2.0 services.


Creating a WSRP Consumer

To communicate with the portlets offered by the producer, a consumer needs to add a configured producer.

ProcedureTo Create a WSRP Consumer

To create a consumer, a producer WSDL URL is required. You can copy the WSDL URL from the NewProducer created in the above step.

  1. Log in to Web Space Server as the admin user.

  2. Navigate to Control Panel -> Server -> WSRP Consumer from the Welcome menu.

  3. Click the Connect to Producer button.

  4. Provide the WSRP Producer WSDL URL and click Next.

    Figure 7–2 Providing the WSRP Producer URL for Creating a WSRP Consumer.

    Providing the WSRP Producer URL for Creating a WSRP Consumer.

    The next screen prompts you to choose the WSRP version.

  5. Choose Version 2.0 and click Next.

    The next screen prompts you to select a registration type.

  6. Select Inband and Outband.

    For more information about these registration types, see Inband and Outband Registration

  7. (Optional) Specify a Name and Lifetime for the consumer.

    Figure 7–3 Version, Registration Type, Lifetime and Other Details for the WSRP Consumer

    Version, Registration Type, Lifetime and Other Details
for the WSRP Consumer

    In case of Outband registration, you have to specify a registration handle. Select Inband registration and click Save. The consumer is created.

Creating WSRP Producers and Consumers Without Registration

The consumer is not required to type any details while adding a configured producer, if the producer does not require registration.

ProcedureTo Create a Producer Without Registration

  1. Log in to Web Space Server as the admin user.

  2. Navigate to Control Panel -> Server -> WSRP Producer from the Welcome menu.

  3. Click the Add Producer button.

    Specify a name for the producer. Select Not Required for Registration.

    Figure 7–4 Creating a Producer Without Registration

    Creating a Producer Without Registration

  4. Click Save.

    The producer is created, but is disabled by default. Enable the Producer.

  5. To enable the WSRP Producer:

    1. Click the link for a selected producer.

      In this example, click the NewProducer link. The producer is displayed.

    2. Move some portlets from the Unpublished list to the Published list.

    3. Click Save.

      The producer is saved.

    4. Click the Disabled link.

      The producer is displayed again.

    5. Select Enabled from the Status list and click Save.

      The producer is enabled.


    Note –

    By default, the newly created WSRP producer exports both WSRP version 1.0 and WSRP version 2.0 services in the exported WSDL. On checking the WSDL URL, you should see both version 1.0 and version 2.0 services.


ProcedureTo Create a Consumer Without Registration

  1. Log in to Web Space Server as the admin user.

  2. Navigate to Control Panel -> Server -> WSRP Consumer from the Welcome menu.

  3. Click the Connect to Producer button.

  4. Provide the WSDL URL of a producer without registration and click Next.

  5. The next screen prompts you to choose the WSRP version.

  6. Select Version 2.0 and click Next.

  7. Type a name for the Consumer and click Save.

    Figure 7–5 Creating a Consumer Without Registration

    Creating a Consumer Without Registration

Installing Remote/WSRP Portlets

This section describes the process to install Remote/WSRP portlets on Sun GlassFish Web Space Server.

ProcedureTo Install a Remote/WSRP Portlet

  1. Log in to Web Space Server as the admin user.

  2. Navigate to Control Panel -> Server -> WSRP Consumer from the Welcome menu.

  3. Click the Actions button corresponding to a consumer and choose Install Portlets from the menu.

    The Available Portlets list displays all the portlets available with the producer.

  4. Select a portlet from the list, and type a name for the portlet.


    Note –

    Make sure to specify a name for the portlet. If no name is displayed for the portlet, identifying it will be difficult.


  5. Click Save.

  6. Click the Portlet tab to view the portlet.