Web Connection Messaging - Sequential View

The messaging steps are listed in temporal sequence. To understand the process flow, read the items in numerical order. You can also view these items arranged by class and component.

File-Based Messaging

COM (Automation) Messaging

  1. 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.
  2. In the Server Object (class wwServer) a timer member object (class wwFileTimer) regularly calls the CheckForMessageFile() method, which looks for new request files.
  3. In the Server Object when a new request file is found, the timer calls the framework ProcessHit() method in the server object.
  4. The ProcessHit method then calls the Process() method in your application's main program (for example, wcDemoMain.prg).
  5. 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).
  6. Your application program instantiates a process object (defined in the same PRG) as a subclass of wwProcess, where the user scipts the Response object.
  7. The Process Object also instantiates a Response object, passing it the required return file name, as determined from wwRequest.GetOutputFile().
  8. The Request Object GetOutputFile() method gets Output File spec from the Server Variables portion of the request file.
  9. The Response (HTML) Object, in the Init() method, creates a file with the filename that was determined by the wwRequest object.
  10. 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.
  11. 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.
  1. WC.DLLMakes a direct COM call to the ProcessHit() method in a wwOleServer object.
  2. ProcessHit() method calls user's Process() method in wcmain.prg.
  3. wcMain.PRG (or equivalent) Process method calls user program (eg, wwdemo.prg).
  4. 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.
  5. wwProcess Class Instantiates a wwResponseString object.
  6. 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.)
  7. Destroy() method stores wwResponseString’s output directly to wwServer’s cOutput property.
  8. ProcessHit() method returns cOutput string to application that calls the COM server (wc.dll). Includes a cOutput property.
  9. The string that is returned is then sent back to web server.
Author: J. Randy Pearson
© 2000-2001 by Cycla Corporation
Last Update: 03/24/2001