The Framework EDI (FREDI) ISAPI Console is a small utility program that is
used in conjunction with the Framework EDI
AS2 ISAPI Extension on the HTTP server. The program itself has to be on
the HTTP server where the ISAPI Extension DLL resides. Basically, the
console helps maintain the following:
Settings. Control settings to modify the behavior of the FREDI
ISAPI Extension.
ActiveX Test. Tests the methods of the interface specified by
the program ID in the ActiveX component.
The following settings in the console control the behavior of the FREDI ISAPI
Extension. These settings are situated on the tabbed dialog labeled
"Settings" on the console.
The general settings control basic internal operation of the FREDI ISAPI
Extension.
Thread Pool. This check box specifies if a thread pool should
be used. The thread pool assigns a thread to a task that handles a
request from the client. This improves performance on the server in
that its main thread does not get tied up to processing the task. Once
the request has been handed over and processed by a different thread in the
thread pool, the server can return to handle additional requests from
clients. Enter the maximum number of threads in the thread pool in the
Maximum Threads edit box. If this is unchecked, the number
specified in Maximum Threads is ignored, and the ISAPI Extension will
use only one thread.
Transported Files. This setting specifies how the ISAPI Extension
should save the data that it has received to disk. There are currently
2 options:
Save To User-Specific Paths or Folders. This option is to
save the data it has received to a file name specified by the
client. This file name is then passed to the interface methods of
the ActiveX for access. The ISAPI extension will not delete this
file and it is up to the user to do the necessary clean up. This
is the default option.
Receive as Temporary Files. This option saves the data it
has received to a temporary file regardless of whether the client has
specified the target file name. The temporary file is named and
saved to the temporary directory based on default settings of the
operating system. This full file path and name is then passed to
the interface methods of the ActiveX for access. The temporary
file created is deleted after execution of the last interface method
called. This option provides security in that it prevents the
client from overwriting existing files on the server.
The ActiveX Server Settings control how the FREDI ISAPI Extension operates
with the custom ActiveX component.
ActiveX Program ID. Specifies the program identifier of the
COM interface in the ActiveX component that the ISAPI Extension is to call by default. The
COM interface
is what will be instantiated and its methods are called regardless of
whether the client has specified a different interface to use.
Consequently, the client does not need to specify what COM interface the
server is to use to process the incoming file. This option provides
security in that it hides server side implementation from the client.
If this value is blank then the client has to specify the program identifier
to load.
Start Proc. This is the name of the starting method of the
COM interface that the ISAPI Extension is to call. If blank then the
client has to specify the name of the method.
Result Proc. This is the name of the result method of the COM
interface that the ISAPI Extension is to call. If blank then the
client has to specify the name of the method.
Final Proc. This is the name of the final procedure of the
COM interface that the ISAPI Extension is to call. If blank then the
client has to specify the name of the method.
Concurrency Model. Specifies the concurrency model and
initialization of the ActiveX components in FREDI ISAPI Extension. If
the single-threaded apartment is selected then the COM library is
initialized using COINIT_APARTMENTTHREADED (e.g. CoInitializeEx(0, COINIT_APARTMENTTHREADED),
or if multi-threaded is selected then the COM library is initialized using COINIT_MULTITHREADED
(e.g. CoInitializeEx(0, COINIT_MULTITHREADED).
This setting allows the internal operation of the FREDI ISAPI Extension to be
logged to an external file. To allow the extension to log, under the
"Debug Logging" group take the following steps:
Click the radio button Enable.
As soon as the Enable radio button has been selected, the edit
control Log File Name is enabled. Enter the full file path and
name of
the file where logging is to be written out to. The ISAPI extension
must have write-create access to the file in order for logging to take
place.
The ActiveX test feature of the console helps test the method of the
interface in the ActiveX component. The interface is specified by the
programmatic ID. The tabbed dialog is labeled "ActiveX Test" in
the console.
To test the ActiveX, follow these steps:
Prog ID. Enter the program identifier of the interface in the
ActiveX to instantiate (e.g. IsapiSample.Test). Then click the button Load.
If the interface loads up successfully the edit boxes in the dialog will be
enabled.
File Name. Enter the file name to be processed by the ActiveX
component's methods. The methods that require the file name parameter
have to follow the syntax:
Parameters. Enter the additional parameters passed to the
methods. In the syntax shown above, the parameter is passed in the
method parameter sAnyString.
Process Method. Enter the name of the Process method used by
the ActiveX interface, and then click the button Test. The
method is invoked and the file name and parameters specified in steps 2 and
3 above are passed to the method. If this method executes properly,
the result of the method is displayed in the RESULT box and the ActiveX
method dispatch ID is displayed in the DISPID box. NOTE: This is
the first method called by FREDI ISAPI Extension and should be invoked
before the Return or Final methods. For details, please see "The
Processing Method" in Framework EDI ISAPI Extension.
Return Method. Enter the name of the Return method used by
the ActiveX interface, and then click the button Test. This
method should return a string value as a result of executing the Process
method in step 4 above. If this method executes properly, the result
of the method is displayed in the RESULT box and the ActiveX method dispatch
ID is displayed in the DISPID box. For details, please see "The
Result Method" in Framework EDI ISAPI Extension.
Final Method. Enter the name of the Final method used by the
ActiveX interface, and then click the button Test. The method
is invoked and the file name and parameters specified in steps 2 and 3 above
are passed to the method. This method is the last method called by
FREDI ISAPI Extension and is called after the server has disconnected from
the client. If this method executes properly, the result of the method
is displayed in the RESULT box and the ActiveX method dispatch ID is
displayed in the DISPID box. For details, please see "The
Final Method" in Framework EDI ISAPI Extension.
Example ActiveX Test
To demonstrate how to test an ActiveX, follow these steps:
Download the sample Visual Basic program IsapiActiveX.
Compile the program to produce the ActiveX DLL and then register
the DLL.
Launch the ISAPI Extension Console from the menu.
Enter "IsapiActiveX.Sample" in the Prog ID edit box, then
click Load button.
Browse the file "SampleMsg.txt" that comes with the sample
program, and select the file as the File Name selection.
Enter the name of the Process Method in the IsapiActiveX component, which
is "ProcessProc". Then click Test.
Enter the name of the Return Method in the IsapiActiveX component, which
is "ReturnProc". Then click Test.
Enter the name of the Final Method in the IsapiActiveX component, which is
"FinalProc". Then click Test.