Newsletters Subscriptions Media Kit About Us Contact Search Home

Stuff
OS/400 Edition
Volume 2, Number 7 -- March 27, 2003

We're Off to See the Wizard of WebFacing


by Raymond Everhart

When Dorothy needed to get home from the land of Oz, her only hope seemed to rest in the powerful and mighty Oz. With great fear, she entered the throne room to seek a favor from the mysterious Wizard of Oz. Your first encounter with the Wizard of Webfacing does not have to be nearly that scary. Let's pull aside the curtain and take a look at the WebSphere WebFacing Wizard.

Follow the Yellow Brick Road

As Dorothy started to follow the yellow brick road she quickly learned that others would benefit from a visit with the wizard, too. Traveling to an unfamiliar destination in a group is always preferable. We all have those moments when we stand by the road singing, "If I only had a brain." At those times, we need the benefit of someone else's experience. Let me start by saying that your first and best traveling companion should be PTFs. I can't overemphasize just how important it is to stay current with WebSphere software and PTFs. This environment has been evolving at a breakneck pace. New versions that embrace new standards are being released constantly. Since IBM is committed to gaining market share in this arena, the WebSphere development environment will be frequently enhanced and extended to remain relevant and competitive. What I'm about to say goes against everything that I've practiced in 17 years in the midrange marketplace. When it comes to WebSphere, if it's over six months old I'd better be planning a version/release upgrade or PTF. I remember the days when I delayed upgrades for six months to a year while the bugs were sorted out. The WebSphere development cycle is much shorter than that. Since the iSeries implementation of WebSphere involves many interdependent components, it is best to keep them all current. Don't forget that there are host and client PTFs that need to be applied. PTFs are your friends. Look for new PTFs often. Other sources of "courage" along the way are the newsgroups devoted to WebSphere and WebFacing. Your question may have already been answered. The newsgroups are monitored by qualified experts, and by the rest of us. If you need to ask a question, try to completely describe your environment (hardware, software versions, fixpacks) and your problem. Be specific. Here are some links you may find helpful.

Don't proceed any further down the yellow brick road until you have installed and applied all fixpacks and PTFs. This is one flying monkey you don't want to mess with.

Starting the WebFacing Server

Before working with the WebFacing Wizard, make sure that the WebFacing Server is running on the iSeries server. This iSeries component is what allows the interactive RPG program to communicate with the WebSphere Application Server or the Tomcat application server.

To start the WebFacing Server, go to a command line on the iSeries server that you are going to use. For V5R1, type the command STRTCPSVR *WEBFACING. For V4R5, type the command STRWFSVR.

Next, verify that the WebFacing Server is active. Go to a command line on the iSeries. Type the command WRKACTJOB JOB(QQF*). If the WebFacing server is active, there will be two active jobs, plus one job for each user of a WebFaced application.

Don't Forget Your Ruby Slippers

WebSphere Studio Site Developer Advanced, also known as WSSDA, is the Eclipse-based development environment that we will use to WebFace our application. The Eclipse development environment allows plug-ins to be written and tightly integrated into the workbench. From this application we will do all of our development and testing.

Starting WebSphere Studio Site Developer Advanced

  1. Click the Start button.
  2. Select Programs.
  3. Select Websphere Studio Site Developer Advanced.

This is a Java-based interactive development environment, so it can take more than a minute to start, depending on your hardware configuration. But once you get started, performance is much better.

Configuring a Remote System

To open the remote explorer perspective:

  1. Go to the top menu bar and click Perspective. Select Open. Select Remote System Explorer.
  2. Expand the New Connection item on the tree.
  3. Type in a connection name.
  4. Type the host name of the iSeries server to connect to.
  5. Type in a user ID, and make sure that the arrow points to the right.

Once the remote system has been configured, you should be able to drill down into the file/library structure of the iSeries server by expanding the remote server that you just created.

The WebFacing Perspective

To open the WebFacing Perspective:

  1. Go to the top menu bar and click Perspective.
  2. Select Open.
  3. Select Other.
  4. Select WebFacing.

An icon will appear on the left-hand edge of your window. An icon is created for each perspective that is open. Clicking these icons allows you to quickly switch between perspectives. When your mouse pointer hovers over the icon for a few seconds, a text box pops up on the screen and describes the perspective that the icon represents.

Running the Wizard

To create a new WebFacing project:

  1. From the top menu bar, click File.
  2. Select New.
  3. Select Other.
  4. Select WebFacing Project, on the left and right side panel.
  5. Click the Next button to start the Wizard.

Give your WebFacing project a name. Then click the Next button.

Next, select the DDS source members that will be used in your project:

  1. Select which library to display, or use the supplied default of *LIBL.
  2. Press the Refresh DDS List button, and a list of libraries will appear.
  3. When the library is expanded, a list of source physical files is shown.
  4. When the source physical file is expanded, the source members are shown.
  5. Select the required source member and press the double-arrows (>>) to add the selected source member to the project.
  6. When all the required source members have been selected, press the Next button.

Next, select the UIM members required for your project. Repeat the previous set of steps (for selecting the DDS source members that will be used in your project) in order to select the UIM source members. If you have no UIM source members to convert press the Next button.

This is a good time to discuss the library list that is required to run your program. The easiest way to get your library list setup correctly is to do it within a CL program, which calls the RPG program. Don't presume that the library list from your profile or initial program will give you what you expect.

Next, specify how to start the application:

  1. Type the CL command that is used to start the program. (Include any parameters required with the prefix &.)
  2. Type a descriptive title for this application.
  3. Press the Add button.
  4. Once the required CL commands have been entered, press the Next button.

Select the Web style that you want to use for this project. A sample of each style is shown when it is selected. Once you have finalized your selection, press the Next button.

Now we have arrived at our last wizard screen. You have the choice of creating the project and converting the display files or just creating the project. For this example, select the Yes button and press the Finish button. This may take some time.

When the wizard is finished, The Display File conversion log is displayed. Any problems or unsupported keywords found in the selected DDS are listed.

There's No Place Like Home

The workbench also contains a copy of the WebSphere Application Server. This allows us to test our applications before we deploy them to the production application server. The first time you attempt to run a WebFaced application on the local server, a server instance and configuration will be created automatically.

To run the application on the local test server:

  1. Switch to the WebFacing perspective.
  2. Right-click the WebFacing project you just created.
  3. Select Run On Server.

A Web browser will appear in the upper right hand corner and a server console window will appear in the lower right hand corner. When the server console displays the message "server default server open for e-business," a set of links to your application appears in the browser window. Do not click these links! I know you really want to, but it's not time yet.

Before we go on, we need to modify a few settings in our local copy of the application server.

Open the server Perspective:

  1. On the top menu bar, click Perspective.
  2. Select Open.
  3. Select Other.
  4. Select Server.

Change the server instance:

  1. In the server configuration window (on bottom left), expand the server instances.
  2. Double-click WebSphere V4.0 Test Environment.
  3. In the upper right window, select the Environment tab, at the bottom of the window.
  4. Click the Add button to add a System Property, and fill in the Edit System Property dialog box.
  5. Click OK.
Edit System Property dialog

Save the editor contents by clicking the diskette button on the toolbar.

Change the server configuration:

  1. In the server configuration window (bottom left), expand server configurations.
  2. Double-click WebSphere Administrative Domain.
  3. In the upper right window, select the General tab, at the bottom of the window.
  4. Change the Module Visibility Setting to MODULE.

Save the editor contents by clicking the diskette button on the toolbar.

Testing Your WebFaced Application

Now you're ready to run your WebFaced application. Switch to the perspective that contains your browser session and click a link. Launching the application in a new browser window is the preferred method. This method removes the browser's navigation buttons from the top of the screen. Keep in mind that this is still an RPG program, and therefore it does not know what to do when the Back button is pressed. The easiest solution is not to present the navigation buttons at all. After you have clicked the link, a sign-on display is shown. Sign on to the application using your iSeries user ID and password. The next part is the hardest, and that is waiting. One thing about a WebFaced application is that, compared with a 5250 green-screen application, it is slow to start. The hardware you are using for you your desktop will impact performance during testing. Generally, performance improves after the first screen or when there are multiple users. If there's one thing the WebSphere Development Studio client likes, it's memory. The more you have, the better your experience will be.

Searching for Your Heart's Desire in Your Own Backyard

You've done it! You've created an application that can be deployed via a browser and an application server. What does this do for you? It buys you time. Time to determine your strategic direction. Time to learn how this new method of deploying applications affects you. Time to learn what you need to know next. WebFacing allows you to do all this and still leverage your existing code and skills. Think of WebFacing as a short-term means to an end, an end that's somewhere over the rainbow.


Related Article


Raymond Everhart is an independent programmer/consultant in the Dallas/Fort Worth area and has 17 years of experience with IBM midrange servers. E-mail: reverhart@raecodesign.com.


Sponsored By
ESKER SOFTWARE

Why pay for more emulation than you need?
Get secure IBM® host access for only $50 USD.

With some emulation software products, you can end up paying for unnecessary non-IBM extras. Or missing vital components like security. Not with Esker. Our SmarTerm family of host access solutions includes SmarTerm 3270/5250 -- a complete solution tailored for IBM mainframe and/or AS/400® iSeries™ environments. And you can get new licenses for only $50 USD.

With SmarTerm 3270/5250 you get everything you need for secure IBM host access. Nothing you don't.

  • A proven solution trusted worldwide, in every industry, for 2 decades
  • High-level security to protect sensitive host data
  • Consistent emulation throughout your Windows® networks
  • Multi-OS compatibility for continuity of your host applications
  • Full-featured tools for high productivity and low maintenance

See why SmarTerm 3270/5250 is the perfect fit for reliable access to IBM hosts. Go to www.esker.com/whypaymore now for a FREE SmarTerm 3270/5250 information kit and evaluation CD.


THIS ISSUE
SPONSORED BY:

T.L. Ashford
Esker Software
ASNA
Profound Logic Software


BACK ISSUES

TABLE OF
CONTENTS
Pivot Data with SQL/400

We're Off to See the Wizard of WebFacing

Creating and Consuming an AS/400 Web Service

The Java-Based iSeries System Debugger


Editors
Shannon O'Donnell
Kevin Vandever

Managing Editor
Shannon Pastore

Contributing Editors:
Howard Arner
Raymond Everhart
Joe Hertvik
Ted Holt
David Morris

Publisher and
Advertising Director:

Jenny Thomas

Advertising Sales Representative
Kim Reed

Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com


Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.