- The ISAPI connector application WC.DLL
receives a request through the web server (Microsoft Internet Information Server)
and creates a temporary request file (for example, WC_*.TMP) in a specified directory. This file includes a
the name of the return file that is to be created by your application with the HTML result.
- In the Server Object (class wwServer) a timer member object (class wwFileTimer) regularly
calls the CheckForMessageFile() method, which looks for new request files.
- In the Server Object when a new request file is found, the timer calls the framework
ProcessHit() method in the server object.
- The ProcessHit method then calls the Process() method in your application's main program
(for example, wcDemoMain.prg).
- A DO CASE structure in the Process method of your main program parses the incoming URL and
calls the correct application program to process the specific page (for example, wwDemoProcess.prg).
- Your application program instantiates a process object (defined in the same PRG) as a subclass of wwProcess,
where the user scipts the Response object.
- The Process Object also instantiates a Response object, passing it the required return file
name, as determined from wwRequest.GetOutputFile().
- The Request Object GetOutputFile() method gets Output File spec from the Server Variables
portion of the request file.
- The Response (HTML) Object, in the Init() method, creates a file with
the filename that was determined by the wwRequest object.
- When the response preparation process is complete, the ProcessHit() method back in the Server Object
calls SendReturnMessageFile(), which causes a 0-byte .RET file
to be written.
- WC.DLL continually polls for the creation of this filename with a .RET extension,
which is a signal that the temporary response file is ready. When it sees the RET file, WC.DLL grabs the
corresponding .TMP file contents to give back to the web server.
|
- WC.DLLMakes a direct COM call to the ProcessHit() method in a wwOleServer object.
- ProcessHit() method calls user's Process() method in wcmain.prg.
- wcMain.PRG (or equivalent) Process method calls user program (eg, wwdemo.prg).
- wwDemo.PRG (or equivalent)
instantiates a process object (defined in the same PRG) as a subclass of wwProcess,
where the user scipts the Response object. One of the parameters tells the process
class to instantiate a string-based HTML object, used in COM messaging.
- wwProcess Class Instantiates a wwResponseString object.
- A string property, cOutput, is used to build the entire HTTP result string.
(A temporary file may be used
internally to optimize speed for larger pages, but this is self-contained and not part
of the messaging scheme.)
- Destroy() method stores wwResponseString’s output directly to wwServer’s cOutput property.
- ProcessHit() method returns cOutput string to application that calls the COM
server (wc.dll). Includes a cOutput property.
- The string that is returned is then sent back to web server.
|