Consultor Eletrônico



Kbase 21025: Setting up the WebClient Sample Application With IntelliStream
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Verified

GOAL:

How to setup a Webclient Sample Application with IntelliStream.

GOAL:

How to set up Webclient sports2000 demo with IntelliStream

FACT(s) (Environment):

Windows 32 Intel
Progress 9.1x

FIX:

These instructions cover:


Setting up the application on the AppServer machine
Setting up the cabinet file containing the application configuration file on the Web server machine
Installing and running the application on the client machine


Configure the Web Server first:
Ensure the Java Servlet Engine and the AppServer Internet Adapter are setup prior. For instructions on setting up the Java Servlet Engine (JSE) and the AppServer Internet Adapter (AIA) on the Web server, refer to:
20524, "How to Setup Jrun 3.0 With AIA 9.1x on a UNIX Platform"
20210, "How to set up JRun 3.0 with AIA 9.1x"
20189, "Setting up ServletExec 3.0 Application Server with AIA 9.1B and later on Windows"
P21274, "How to setup Tomcat and the AppServer Internet Adapter AIA"
P109721, "How to configure Tomcat 5.5.x with Progress AIA."
P19929, "How to setup Tomcat and IIS?"
In addition to this, it is necessary to configure MIME Types for your Web Server. Detailed information on how to do this can be found in the Progress / OpenEdge documentation:
Progress 9.1x "Progress on the Web", chapter 7.4.4 "Hosting on a Web Server", "Configuring MIME Types for Your Web Server"
OpenEdge Deployment: "WebClient Applications", chapter 7 "Deploying an Applcaition", "Hosting the application on a server", "Hosting on a Web Server", page 7-36 "Configuring MIME types for your Web server"

Setting Up the Application on the AppServer Machine


These instructions use the following symbols:
%DLC% The Progress installation directory on a particular machine.
%ASWORKDIR% work directory of a Progress AppServer.
%APPROOTDIR% the root directory of a WebClient application.
%OUTDIR% the directory in which the WebClient application assembler places the files it generates.
%MYWEBSERVER% represents the Web server's domain name or IP address.

This example assumes that the AppServer machine is the same as the development machine on which the front-end and back-end application code has benn prepared. For this reason, this must be a Windows machine.)

1. A complete Progress development product must be installed on the AppServer machine.

2. Verify that a Progress AppServer has been installed and configured on the AppServer machine.

3. Create the WebClient application root directory, the symbol for which is %APPROOTDIR%. The application root directory can reside anywhere.

4. Recursively copy the source-code files of the Sports2000 application from the %DLC%\src\sports2000\gui directory to %ASWORKDIR%.
The gui directory contains both back-end and front-end application files. %ASWORKDIR% is where the entire application will be compiled, though only the back-end r-code (.r) files will be run from this directory.

5. Create a copy of the Sports2000 database on the AppServer machine. The copy can reside anywhere, but be sure to note its path.

6. Start a Progress session. Within the Progress session perform the following:


a) Connect to the Sports2000 database, entering its pa.th, which you noted in Step 5.

b) Use the PROPATH Editor to add the AppServer work directory to the PROPATH.

c) In the Application Compiler, go to Options > Compiler:

Change "Minimize R-code size" to YES
Change Generate MD-5 to YES
Click OK.
In the main window, click Modify. In the File Specification window, enter the AppServer's working directory, click OK, and compile the application.
7. Recursively copy the following directories as specified below, creating the destination subdirectory as necessary:
Recursively Copy This Directory To This Location

%ASWORKDIR% %APPROOTDIR%\appl
%DLC%\gui\adm2 %APPROOTDIR%\gui\adm2
%DLC%\jms %APPROOTDIR%\jms
%DLC%\src\sports2000\images %APPROOTDIR%\appl\images



8. Copy the following files as specified below, creating the destination subdirectory as necessary:
Copy This File To this Location
%DLC%\src\samples\webclient\dynappdel\sportspro.ini %APPROOTDIR%
%DLC%\src\samples\webclient\dynappdel\appsrvtt.d %APPROOTDIR%
&nbs.p; %DLC%\src\samples\webclient\dynappdel\sportspro.wcp %APPROOTDIR%
%DLC%\gui\adecomm.pl %APPROOTDIR%\gui
%DLC%\gui\adeicon.pl %APPROOTDIR%\gui
%DLC%\gui\adexml.pl %APPROOTDIR%\gui
%DLC%\gui\adeicon\progress.ico %APPROOTDIR%
%DLC%\bin\system\csspin32.ocx %APPROOTDIR%

9. Use a text editor to modify the appsrvtt.d file, which was copied in Step 8, as follows:


a) In appsrvtt.d, modify the string 'http://yourservername:JSEPORTNUMBER/aia/Aia?AppService=sports2000partition' to contain your webservers information.

b) Save appsrvtt.d.
10. Use the WebClient Application Assembler as follows:


a. From the main menu, select File> Open, and open %APPROOTDIR%\sportspro.wcp.

b. On the General tab, change the path of the application root directory from the default to the path on the AppServer machine.

c. Click on the Locator button. Change the URL to the host name of the server hosting the configuration file.

d. In the Codebase Locator Definition window (.main menu - Deployment - Locators > Codebase), change the URL to the host name of the server hosting the codebase.

e. On the Options tab, check the System Tasks toggle box and click the System Tasks Definition button. On the Shortcut tab, check the Application Shortcut toggle box and click the ... button next to the Icon field. The Open window appears. Manipulate the Open window to select the progress.ico file, which was copied to %APPROOTDIR%.
On the Files tab, Remove the file d:\demo91c\sportspro\csspin32.ocx. Add the file %APPROOTDIR\csspin32.ocx.Confirm that the Application Specific toggle box is checked.

NB: In OpenEdge 10 the adm2 distribution contains more files than in the Progress 9.x installation.
However, the sportspro.wcp which contains the file lists for the webclient application was
not updated to reflect the new files. Therefore, even though the webclient assembly succeeds,
the application will fail at run time later with "procedure not found" errors.
At this step, between sub-steps e and f, one must do:
- go to the component tab
- click "main"
- click "Edit..."
- click "Add..."
- go to gui/adm2 on the left pane
- select all files on the right
- click "Add"

NB: Check that Webclient application version matches the Progress / OpenEdge installation.
The file distributed with OE10.1A defines 10.0B as client version (which is incorrect).
f. Save sportspro.wcp.

g. In the Generate window (main menu- Deployment-Generate), choose Regenerate Latest Version.
In the Output Directory field, enter the name of the directory where the generated files are to be placed - the value of %OUTDIR%. Click OK.
The Application Assembler will create the application configuration file and the cabinet files and places them into the output directory specified.
11. Start a database server for the Sports2000 database running on the AppServer machine.

12. Use the Progress Explorer to configure the default asbroker1 AppServer instance as follows:


a. In the General Options for Broker tab change the broker working directory to the AppServer work directory (%ASWORKDIR%).
b. In the Appservice Name list, add the service name sports2000partition.
c. In the General Options for Server tab add the database connection parameter to Server Startup Parameters. Example if the Sports2000 database resides at %ASWORKDIR%\databases, enter the string: -db %ASWORKDIR%\databases\sports2000

13. Start the asbroker1 AppServer instance. For example (using the asbman command): %DLC%\bin\asbman -name asbroker1 -start

Setting Up the Application to Launch from the Web Server:
Follow these steps to set up the application to launch from the Web server machine:

1. Copy sportspro.prowcapc ( cabinet file contains the configuration file to be downloaded) and the cabinet (.cab) files (containing the application files to be downloaded) from %OUTDIR% on the AppServer machine to the Web server root directory as follows:

a. Create a directory 2.0 in the Web server document root dir
b. Copy the cabinet files to the 2.0 directory
c. Copy sportspro.prowcapc to the Web server document root dir

2. Configure (if not already configured) and start an instance of the AppServer Internet Adapter to run as a Java servlet in the Java Servlet Engine and to access the AppServer served by asbroker1.

Setting Up the WebClient Install and Bootstrap Mechanism:
Follow these steps to set up the WebClient install and bootstrap mechanism:

1. Recursively copy the webinstall\web.client\web_image directory from the Progress / OpenEdge Install CD to the the Web server's document root directory.

2. Edit the bootstrap.htm file (copied in Step 1) to reference the WebClient install image and the application configuration file as follows:


Replace the document.location.href and window.location URLs to match the location of the configuration and webclient.htm files, respectively.
Example:
document.location.href = "http://pctest/web_image/sportspro.prowcapc";window.location = http://pctest/web_image/webclient.htm;
3. Edit the webclient.htm file (copied in Step 1) as follows:


Change <URL to your .prowcapc file> to 'http://%MYWEBSERVER%/web_image/sportspro.prowcapc.'

Example: ether.SetProperty("ProwcappURL", http://pctest/web_image/sportpro.prowcapc);
Installing and Running the Application on the Client Machine:

Follow these steps to install and launch the application on the client machine:
1. Using a Web browser (Internet Explorer or Netscape) go to the URL: http://hostname/web_image/bootstrap.htm

2. To install WebClient and the Sportspro application, respond to the prompts. The application will be installed..