| By Matt Silver | Article Rating: |
|
| March 27, 2008 11:00 AM EDT | Reads: |
8,219 |
For simplicity's sake, I've created two JSR-168 portlets, which you can download at the end of the article:
- BEA Java Portlet - Echoes back a message entered into a text field by the user when the user clicks the Update Message button.
- IBM Java Portlet - Allows the user to input addresses, edit addresses, delete addresses, and list addresses. To reduce the complexity of the portlet, the application doesn't persist the information to a database, but instead stores the information in memory.
Scenario 1: WebLogic Portal Acts as a Consumer and WebSphere Portal Acts as a Producer
For WebLogic Portal to consume a WebSphere Portal portlet, several things need to happen:
- WebSphere Portal
- Functions as a producer
- Offers (shares) the portlet
- WebLogic Portal
- Functions as a consumer
- Adds a producer
- Creates a remote portlet
- Adds the remote portlet to a page
Note that if security is enabled on the producer, the producer must also provide the consumer with additional information, including the security setup of the producer portal. Security is outside the scope of this article.
WebSphere Portal - Offer a Portlet
Log onto WebSphere Portal (e.g., http://portalpc:10038/wps/portal). Click the Launch button and select Administration to navigate to the WebSphere Portal Administration Console. (Notice that the URL is in the format http://hostname:port/wps_context_root/wps_default_home.)
Click the Portlets node underneath Portlet Management in the navigation bar.
Search for the portlet that you want to share using the Manage Portlets administration portlet. Click the first icon (Provide Portlets) to the right of IBM Java Portlet.
Click OK when asked whether or not you want to provide IBM Java Portlet as a Web Service. A checkmark will appear in the Provided column and a success message will appear at the top of the Manage Portlets portlet.
If you want to see a list of all the provided offered portlets, select All provided portlets from the Search by drop-down menu and click Search.
Should you decide in the future that you no longer want to share this portlet, you can click on the icon again. Notice that the icon now has a line drawn through it and is labeled Withdraw Portlet. If you perform this action, the checkmark in the Provided column will disappear.
Congratulations! That's all there is to sharing a portlet. Now it's on to configuring the consumer.
WebLogic Portal - Add a Producer
Log onto the
WebLogic Portal Administration Console for the portal EAR project that
you've deployed (e.g., http://localhost:7001/BEAPortalEARAdmin) and
click Portal Management. (Notice that the URL is in the format (http://hostname:port/ear_nameAdmin.)
Expand Portal Resources and then click on the Library node in the navigation bar. WebLogic Portal will display a listing of the all the different types of components that you can use in your portal, including portlets and pages. Also, listed there is a node called Remote Producers. Click on Remote Producers.
Next, click on the Add Producer button. A wizard will open that steps you through the process of adding a producer. Keep in mind that adding a producer means that WebLogic Portal is simply "discovering" a producer so it can "consume" its portlets.
The first step in the process is the most critical. Enter the Producer WSDL URL. This URL points to the WSDL document that contains information about the producer and how to connect to its services. Specifically, it contains the URLs of the WSRP interfaces supported by the provider. This includes the two mandatory service interfaces mentioned earlier (i.e., service description and markup) as well as any optional interfaces provided by that service. In the case of WebSphere Portal, the standard format for this URL is:
http://producer_portal_host:producer_port/wps_context_root/wsdl/wsrp_ser...
In our case, this URL translates to:
http://portalpc:10038/wps/wsdl/wsrp_service.wsdl.
Enter this URL.
Now that you've input the URL, click the Search button. A single producer should be located. Select the producer from the results list. Before proceeding to the next step of the wizard, check the checkbox View producer's available portlets before adding producer. This will let you view the producer-offered portlets in step 2 of the wizard; otherwise, the wizard will skip step 2.
Click Next. In our case, a single portlet should be displayed that corresponds with IBMJavaPortlet.
Click Next. Now it's time to enter the producer properties that will be stored on the consumer side. The only item that you're required to input is the Producer Name (Handle). Input IBM WebSphere Portal Server v6.0. Optionally, you can input a vendor and a description.
Click Next. Notice that the wizard skips step 4, the registration step. Remember that IBM WebSphere Portal doesn't support the registration interface, since it's optional. (See Figure 2)
Click Finish to create the remote producer. The remote producer will be displayed inside the Browse Remote Producers table. There is a Test Connection button that you can click on to make sure that WebLogic Portal can communicate with WebSphere Portal. However, if it couldn't, you would have gotten an error message during the first step of the wizard.
Published March 27, 2008 Reads 8,219
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Matt Silver
Matt Silver is a courseware developer and trainer, currently serving as a senior consultant for Web Age Solutions.
![]() |
ambujsaxena 08/26/08 05:57:01 AM EDT | |||
Hi Matt, I have some problem with retrieving the producer, when i am entering the wsdl of my service(https) which is in WSRP and hosted on IIS, then its saying unable to retrieve producer. |
||||
- Kindle 2 vs Nook
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- Confessions of a Ulitzer Addict
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- It's the Java vs. C++ Shootout Revisited!
- Cloud Computing Can Revitalize Your Career as Software Developer
- IBM Could "Reinvent" Java: Mills
- Oracle & Cloud Computing: Exclusive Q&A with SVP Richard Sarwal
- A Brief History of Cloud Computing
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- JavaServer Faces (JSF) vs Struts
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- What's New in Eclipse?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- i-Technology Predictions for 2007: Where's It All Headed?





































