WarpDoctor Rexx Plug-in MIME-Types

The plug-in recognizes and number of MIME-Types, as shown in the table below. The MIME-Type passed to the plug-in by the browser tells the plug-in what type of Rexx program it needs to run, and how to run the program. The browser also uses the MIME-Types to determine which plug-in to load for a particular data stream.

The last three MIME-Types in the table (below the horizontal rule) are MIME-Types that are recognized by the plug-in but not registered with the browser. This means that they represent certain types of data, not types of Rexx programs.

Note: the MIME-Type values are case sensitive.
MIME Type Description
x-warpdoctor/cmdrexx Command line Rexx, or Rexx running in an OS/2 Command Prompt window.
x-warpdoctor/rexx Rexx program running as a macro of the plug-in. The output is routed to an output window on the HTML page.
x-warpdoctor/drrexx DrRexx/DrDialog application, running either in its own window or as an applet.
x-warpdoctor/gpfrexx GPF Rexx application. The application can run either in its own window or as an applet.
x-warpdoctor/vxrexx VX-Rexx running as a macro of the plug-in. The application runs as an applet.
x-warpdoctor/vx-rexx VX-Rexx running in a separate session/process. The application can run either in its own window or as an applet.
x-warpdoctor/generic Generic Rexx or other application.
x-warpdoctor/execute Used by JavaScript programs to pass variables to a waiting Rexx program.
x-warpdoctor/warpin WarpIN install package file in the *.WPI format.
x-warpdoctor/download_gzip Data stream compressed with gzip.
x-warpdoctor/error Used to return error message by wdPluginCgi.exe when an error is encountered. The error text is in the body of the HTTP message, and is placed in the return value for the wdCommand() function.
x-warpdoctor/error_12 Error getting *VRW file (VX-Rexx window file) to go with the *.VRM (VX-Rexx macro) file.

The section below provides detail information for each of the MIME-Types. For each MIME-Type the following information is provided.

x-warpdoctor/rexx

Any non-visual type Rexx program. The program runs as a macro of the plug-in.

File Extensions

.CMD and .REX

Rexx Output Window

The Rexx output window is ON by default.

Run-time Files Needed

None

Remarks

This MIME-Types runs Rexx programs as a macro of the plug-in. Rexx output generated by the SAY statement, or sent to STDOUT is routed to the Rexx Output Window that is displayed in the plug-in area of the HTML page; the area defined by the width and height parameters of the EMBED tag. The Rexx Output Window is an OS/2 Multiline Edit control.

When the Rexx PULL statement is encountered the cursor is placed at the end of the text in the output window and the window is changed to writable. The user types the response for the PULL command directly into the output window. As soon as the user terminates input by hitting the enter key the output window is changed back to read-only status.

It is possible to turn off the Rexx output window with the RexxOutputWindow parameter of the embed tag. If the output window is turned off all output generated by the SAY statement or STDOUT is discarded. Any Rexx PULL statements encountered while the Rexx output window is turned off will cause the Rexx program to hang.

Programs running as this MIME-Type automatically have all the plug-in Rexx functions available to them without having to load or register any of the functions. Meaning that the program does not have to use the RxFuncAdd() function to load the plug-in functions.

Almost any type of Rexx program can run as this MIME-Type, the exceptions being Rexx programs that use screen functions from the RexxUtils packages, e.g. SysCls(), SysCurPos(), SysCurState(), etc. They must run as x-warpdoctor/cmdrexx

x-warpdoctor/cmdrexx

Rexx program that runs in its own session, an OS/2 Command Prompt window.

File Extensions

.CMD and .REX

Rexx Output Window

The Rexx output window is ON by default.

Run-time Files Needed

None

Remarks

Rexx programs are run in their own OS/2 Command Prompt window. The program is started using CMD.EXE. Output from the program is routed to the Command Prompt window, just as when running normally outside of the plug-in.

The Rexx output window is on by default and the Rexx program can send output to the window using the SayToWin command.

By default the Command Prompt window that runs the Rexx program is closed when the program terminates. If you want the window to remain open after the Rexx program terminates you can use the EMBED parameter CloseOnExit=NO or you can set the CloseOnExit plug-in variable from the Rexx program before the program terminates.

Regardless of the setting of CloseOnExit the Command Prompt window is closed, and the Rexx program terminated if it is still running, when the plug-in window is closed or the page containing the EMBED tag that loaded the plug-in is destroyed. (The plug-in page is the one that contains the Rexx output window.) If the Rexx program needs notification that is about to be terminated it needs to open a message pipe back to the plug-in to receive notification of the impending termination.

Since cmdrexx programs run in a separate session the program must load the plug-in Rexx functions using the statements shown below, if the program wants to use any of the plug-in functions.

call RxFuncAdd "wdPluginLoad","wdplugin","wdpluginLoad" call wdPluginLoad

The plug-in functions are provided in the file wdPlugin.DLL which must be present on the LIBPATH of the client machine. The plug-in automatically checks for the presence of wdPlugin.DLL before starting the Rexx program.

x-warpdoctor/drrexx

Rexx applications built with the DrDialog tool.

File Extensions

.RES

Rexx Output Window

The Rexx output window is OFF by default.

Run-time Files Needed

DrRexx.exe and wdPlugin.dll

Remarks

DrRexx applications are visual Rexx applications built with the DrDialog tool. DrRexx is the run-time that runs the application. DrRexx applications are completely contained within a single *.RES file, although the program may use additional graphics that need to be downloaded.

DrRexx applications need the run-time DrRexx.exe installed on the client in order to run. The plug-in automatically checks for the existence of DrRexx.exe before starting the application.

DrRexx programs run in a separate session. They can run in a separate window of as an applet on the HTML page. If the program is running as an applet, or if it is running in a separate window and wants to use any of the plug-in commands, the program must load the plug-in Rexx functions using the statements shown below.

call RxFuncAdd "wdPluginLoad","wdplugin","wdpluginLoad" call wdPluginLoad

x-warpdoctor/gpfrexx

Rexx application built with the GPF Rexx tool. The application is encapsulated in the executable file. GPF Rexx programs are run in a separate session.

File Extensions

.EXE

Rexx Output Window

The Rexx output window is OFF by default.

Run-time Files Needed

GPFRRT01.DLL

Remarks

GPF Rexx programs run in a separate session. If the program is running as an applet, or if it wants to use any of the plug-in commands, the program must load the plug-in Rexx functions using the statements shown below.

call RxFuncAdd "wdPluginLoad","wdplugin","wdpluginLoad" call wdPluginLoad

In addition, since GPF handles arguments passed to the program differently than the Rexx "standard", you must use the following lines to call the wdParseArgs() function

queryArg('argvar.') rc = wdParseArgs(argvar.2)

x-warpdoctor/vxrexx

Rexx applications build with the VX-Rexx tool and which run as a macro of the plug-in.

File Extensions

.VRM and .VRW

Rexx Output Window

The Rexx output window is OFF by default.

Run-time Files Needed

WDRUNRX.EXE and VROBJ.DLL

Remarks

VX-Rexx built applications have two MIME-Types assigned to them so that they can be run either as a macro of the plug-in or in their own separate session. This is the MIME-Type to use for running as a macro of the plug-in. It is better to run the VX-Rexx application as a macro of the plug-in rather than in its own separate session because the performance will be slightly better (at least in theory), and because the VX-Rexx application and the plug-in handle focus changes somewhat better running as a macro.

The reasons you might be forced to run VX-Rexx as in a separate session are:

  1. You want to run the VX-Rexx application in its own window, not as an applet.
  2. The VX-Rexx application crashes the browser when it terminates.

Programs running as a macro of the plug-in, which x-warpdoctor/vxrexx does, have all the plug-in Rexx functions available to them without having to load or register any of the functions. Meaning that the Rexx program does not have to use the RxFuncAdd() function to load the plug-in functions.

x-warpdoctor/vx-rexx

Rexx applications build with the VX-Rexx tool and which run as in their own separate session.

File Extensions

.VRM and .VRW

Rexx Output Window

The Rexx output window is OFF by default.

Run-time Files Needed

WDRUNRX.EXE and VROBJ.DLL

Remarks

VX-Rexx built applications have two MIME-Types assigned to them so that they can be run either as a macro of the plug-in or in their own separate session. This is the MIME-Type to use for running as the VX-Rexx application in its own window, or as a separate session when running as an applet.

VX-Rexx programs started with this MIME-Type run in a separate session. If the program is running as an applet, or if it wants to use any of the plug-in commands, the program must load the plug-in Rexx functions using the statements shown below.

call RxFuncAdd "wdPluginLoad","wdplugin","wdpluginLoad" call wdPluginLoad

x-warpdoctor/generic

This MIME-Type is used to run executables that may or may not contain Rexx programs.

File Extensions

.EXE

Rexx Output Window

The Rexx output window is OFF by default.

Remarks

This MIME-Type is used to run executables that may or may not contain Rexx programs. It is intended to run VisPro Rexx, MAID Rexx programs, and to facilitate running other types of programs, such as Mesa/2 as plug-ins. In order to run as an applet the program must be capable of reading parameters passed to the program at startup, must run without a title bar, mimimize or maximize buttons and without sizing borders, must size its window to fit the parameters passed, and must be able to read and write to a named pipe using DosRead() and DosWrite().

x-warpdoctor/execute

Used by JavaScript programs to pass JavaScript variables to a waiting Rexx program.

File Extensions

N/A

Rexx Output Window

N/A

Remarks

This MIME-Type is used to pass JavaScript variables to a Rexx program that has been suspended with the WaitOnJS command. It does not run a Rexx program. The ReleaseInstance=instanceHandle parameter must be specified in the EMBED tag, and the SRC parameter must not be specified.

A Rexx program uses the x-warpdoctor/execute MIME-Type to interface with JavaScript. The Rexx program executes an HTML page with JavaScript, or executes the JavaScript and suspends itself with the WaitOnJS command. The JavaScript program creates and executes an HTML page that has the EMBED HTML tag with the ReleaseInstance parameter, and parameters for each JavaScript variable that is to be passed to the Rexx program. When this page is executed the plug-in deletes all the existing JSVar variables for the instance specified in the ReleaseInstance parameter, creates JSVar variables in that instance for each parameter of the EMBED tag, releases the suspended Rexx program, and then immediately terminates. The Rexx program uses the Query JSVar command to retrieve the values.

x-warpdoctor/warpin

WarpIN installer package in the *.WPI format

File Extensions

.WPI

Rexx Output Window

The Rexx output window is OFF by default.

Run-time Files Needed

WARPIN.EXE and WPIRTL.DLL

Remarks

This type is for fully automating software installation. The install file (the *.WPI) file is downloaded and WarpIN started.