RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Building a Web Service Powered JSR 168 Financial Portlet : Page 2

Broaden the reach of your portlets by making them JSR 168-compliant.

Setting up a portlet supplied from an external web service involves several steps. First, you'll need to register with the web service provider to access content, and to obtain the login credentials needed for access. Typically, you'll find registration instructions at the web site.

The second step is to set up the development environment. The sample application described here used BEA's WebLogic Portal 9.2.1 as the host portal server, and BEA's Eclipse-based Workshop 9.2.1 as the IDE. You can obtain both by downloading the WebLogic Platform 9.2 MP1. Setting up the environment is outside the scope of this paper, but you'll see the configuration settings that vary from the default portal configuration. This example leverages the following technologies:

Feel free to use a different J2EE/portal environment if you are so inclined. As long as the portal container is JSR 168 compliant and runs Java 1.5, you should be able to run the example without problems. If you decide to use different technology, substitute your own choices in the procedures shown here.

To create the sample portal project:

  • Start WebLogic Workshop and create a new 'Portal Web Project' using Workshop's "New Project Wizard."
  • Name the enterprise archive (EAR file) XigniteDemoEAR, and name the web archive (WAR file) XigniteDemoWAR. EAR and WAR are runtime files that support the WebLogic portal applications.
  • In preparation for setting up the Xignite Web Service, create a directory called wsclient under the WebContent directory of the web application.
  • Create a portlets subdirectory in the WebContent folder, and place the viewQuote.jsp file in it.
  • Create a WEB-INF/src/com/nuwave/portlets/ directory, and place the StockQuotePortlet.java file in it.
  • Place the portlet.xml file in the WEB-INF/ directory.
Before you can run the example, you must create a WebLogic Portal domain. You'll find the instructions for doing that in the BEA documentation.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date