Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/SOAP/Components    [ Add a report in this area ]  
Report #:  5737   Status: Closed
Generating WSIL from Service Page Info causes Access Violation
Project:  Delphi Build #:
Version:    10.0 Submitted By:   Petr Vones
Report Type:  Crash / Data loss / Total failure Date Reported:  8/27/2003 5:37:46 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   173994
Resolution: Fixed (Resolution Comments) Resolved in Build: :
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Generating WSIL from Service Page Info causes Access Violation exception under Apache 2 (and possibly other web servers).

The bug is in TWSDLHTMLPublish.WSILInfo method. It calls CoUninitialize too early so the hidden interface cleanup code inserted by the compiler may touch invalid references because COM has been already terminated.
Steps to Reproduce:
1. Create simple Apache 2 shared module webservice
2. Run in under the server
3. Launch web browser and open webservice's info page
4. Click on "Link to WS-Inspection document of Services here" link

exp: WSIL document displayed
act: Internal Server Error 500 or other error message

Possible fix (WSDLPub unit) - tested on Apache 2.0.47

procedure TWSDLHTMLPublish.WSILInfo(const HostScriptBaseURL: string; Request: TWebRequest;
            Response: TWebResponse; var Handled: Boolean);

  procedure GenerateWSIL;
    (original var declarations)
     (original code except CoInitialize/CoUninitialize )



Server Response from: ETNACODE01