![]() ![]() ![]() ![]() ![]() ![]() |
By default, WebLogic Portal projects deployed to a WebLogic Portal domain are configured to function as WSRP producers. If you want to use a Basic WebLogic Server or WebLogic Express domain as a producer, some configuration is required. This chapter explains how to configure a Basic WebLogic Server or WebLogic Express domain as a WSRP producer. Portlets deployed to the server can then be used by consumer applications.
This chapter includes the following topics:
This chapter explains how to configure a basic WebLogic Server domain as a WSRP producer. The example in this section assumes that you have a functioning Struts module deployed in a WebLogic Server domain. The goal of this procedure is to create a portlet in a producer that can be consumed remotely.
By following this procedure, you can expose a Struts application as a remote portlet that a WebLogic Portal application can consume, as illustrated in Figure 8-1.
To configure a WebLogic Server domain to be a WSRP producer involves two steps:
This section explains how to configure a WebLogic Server domain as a producer. You might do this if you want to make portlets available to consumers, but do not want to install the full WebLogic Portal product on your server.
Tip: | A producer created in this way is a simple producer. A simple producer is a producer that offers core WSRP services without requiring a full WebLogic Portal installation. In this configuration, some advanced features, such as registration and interportlet communication, are not supported. For more information on simple and complex producers, see Understanding Producers and Consumers. |
The basic steps you need to perform to enable a WebLogic Server domain to be a WSRP producer are:
In this step, you use the BEA WebLogic Configuration Wizard to create a WebLogic Server domain with the appropriate elements.
In this step, you use the BEA WebLogic Configuration wizard to extend the WebLogic Server domain using an extension template. The extension template adds WSRP producer components to the domain.
This section explains how to create a new WebLogic Server domain using the BEA WebLogic Configuration Wizard. You can then extend the domain to include WSRP producer components.
config.cmd
(or config.sh
) command in WEBLOGIC_HOME/common/bin
. This section explains how to extend your WebLogic Server domain to include the components of a simple producer.
You extend the domain using an extension template. An extension template defines applications and services that can be used to extend an existing domain. The extension template you will use in this example is called wsrp-simple-producer.jar.
config.cmd
(or config.sh
) command in WEBLOGIC_HOME/common/bin
.WEBLOGIC_HOME/common/templates/applications/wsrp-simple-producer.jar
Checkpoint: At this point, you have extended the WebLogic Server domain so that it can function as a simple WSRP producer. Next, you need to configure your web projects.
After you have a WebLogic Server domain that is configured to function as a WSRP producer, you also need to enable any web projects that you deploy to function as a WSRP producer in the domain. After you configure a web project to function as a WSRP producer, portlets you deploy in that project will be available to consumers.
You need to create a web project that is enabled with WSRP producer components. In this example, we demonstrate how to enable a Dynamic Web Project. This type of project does not contain any WebLogic Portal components or WSRP producer components by default.
Checkpoint: You have created a web project in which you can create portlets that will be visible to consumers.
To test the producer configuration, you can do the following:
If you have not done so, create a WebLogic Server in which to run the application on the producer. To do this:
Tip: | For more information on creating a server using Workshop for WebLogic, see the WebLogic Portal tutorial “Setting Up Your Portal Development Environment.” |
The first test to perform is to check that the producer web application returns a WSDL description when you enter the WSDL URL in a browser.
http://localhost:7001/myWebApp/producer?wsdl
If the server and web application are configured properly, the WSDL file appears in the browser. A sample WSDL file is shown in Figure 8-8.
Checkpoint: If the WSDL file appears in the browser, then the server is functioning as a producer. You can now create portlets in the web application that can be consumed as remote portlets in consumer applications.
You can use Workshop for WebLogic to create portlets in the web application on the producer. If you created a Dynamic Web Application, you can create one of the following types of portlets:
For information on creating these portlet types, see the Portlet Development Guide.
Another test you can perform is to try to consume a portlet deployed in the producer from a WebLogic Portal application.
http://producerHost:producerPort
/myWebApp
/producer?WSDL
Where producerHost:producerPort
is the IP address and port number of the machine hosting the producer, and myWebApp
is the name of the context directory for the web application that contains the producer portlet(s) that you wish to surface. See Creating Remote Portlets for more information.
In this section you tested a configuration where a remote portlet in a consumer references a portlet that is deployed to a producer running in a basic WebLogic Server domain.
![]() ![]() ![]() |