I have WebService (ISAPI DLL) with client in Delphi 7. When I call my WebService with my client, everything works fine. Problem is with client in .NET from another company. If as server runnig apache (with isapi-handler), web service does not run. On IIS server is everything ok.
Problem is in function HttpExtensionProc(var ECB: TEXTENSION_CONTROL_BLOCK): DWORD; from ISAPIApp.pas. In this entry point missing content data (ECB.cbTotalBytes = 0, ECB.lpbData = ''). But only on Apache (2.2.17) and .NET client.
Request sent from delphi client - all ok, content is present in entery point:
24.11.2010 10:29:34 - lpszContentType: text/xml; charset="utf-8"
24.11.2010 10:29:34 - cbSize: 144
24.11.2010 10:29:34 - dwVersion: 1280
24.11.2010 10:29:34 - dwHttpStatusCode: 0
24.11.2010 10:29:34 - cbTotalBytes: 640
24.11.2010 10:29:34 - cbAvailable: 640
24.11.2010 10:29:34 - lpszLogData:
24.11.2010 10:29:34 - lpszMethod: POST
24.11.2010 10:29:34 - lpszQueryString:
24.11.2010 10:29:34 - lpszPathInfo: /soap/IWESS_WS
24.11.2010 10:29:34 - lpszPathTranslated: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\soap\IWESS_WS
24.11.2010 10:29:34 - lpbData: <?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><NS1:Login xmlns:NS1="urn:WESS_WSIntf-IWESS_WS"><DBProfile xsi:type="xsd:string">WS test</DBProfile><Username xsi:type="xsd:string">LD</Username><Password xsi:type="xsd:string">ld</Password><Id_Function_Place xsi:type="xsd:int">5</Id_Function_Place></NS1:Login></SOAP-ENV:Body></SOAP-ENV:Envelope>
fiddler log:
POST http://tresnak:8080/cgi-bin/WESS_WS.dll/soap/IWESS_WS HTTP/1.1
SOAPAction: "urn:WESS_WSIntf-IWESS_WS#Login"
Content-Type: text/xml
User-Agent: Borland SOAP 1.2
Host: tresnak:8080
Content-Length: 657
Connection: Keep-Alive
Pragma: no-cache
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><NS1:Login xmlns:NS1="urn:WESS_WSIntf-IWESS_WS"><DBProfile xsi:type="xsd:string">WS test</DBProfile><Username xsi:type="xsd:string">LD</Username><Password xsi:type="xsd:string">ld</Password><Id_Function_Place xsi:type="xsd:int">5</Id_Function_Place></NS1:Login></SOAP-ENV:Body></SOAP-ENV:Envelope>
Request sent from .NET client - fail, content is NOT present in entery point:
24.11.2010 10:29:46 - lpszContentType: text/xml; charset=utf-8
24.11.2010 10:29:46 - cbSize: 144
24.11.2010 10:29:46 - dwVersion: 1280
24.11.2010 10:29:46 - dwHttpStatusCode: 0
24.11.2010 10:29:46 - cbTotalBytes: 0
24.11.2010 10:29:46 - cbAvailable: 0
24.11.2010 10:29:46 - lpszLogData:
24.11.2010 10:29:46 - lpszMethod: POST
24.11.2010 10:29:46 - lpszQueryString:
24.11.2010 10:29:46 - lpszPathInfo: /soap/IWESS_WS
24.11.2010 10:29:46 - lpszPathTranslated: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\soap\IWESS_WS
24.11.2010 10:29:46 - lpbData:
fiddler log:
POST http://tresnak:8080/cgi-bin/WESS_WS.dll/soap/IWESS_WS HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.4952)
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:WESS_WSIntf-IWESS_WS#Login"
Host: tresnak:8080
Content-Length: 728
Expect: 100-continue
Connection: Keep-Alive
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.gordic.cz/g3/ess/v01" xmlns:types="http://www.gordic.cz/g3/ess/v01/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><q1:Login xmlns:q1="urn:WESS_WSIntf-IWESS_WS"><DBProfile xsi:type="xsd:string">WS TEST</DBProfile><Username xsi:type="xsd:string">LD</Username><Password xsi:type="xsd:string">ld</Password><Id_Function_Place xsi:type="xsd:int">3</Id_Function_Place></q1:Login></soap:Body></soap:Envelope>
Where is problem? Why ECB.lpbData does not contain SOAP request if caller is .NET and server is Apache?
Thank you for help in solving.
I try to turn on debug loging in apache and use DumpIO module and soap request is not present in .NET call. If call is from Delphi client, SOAP request is logged in debug log.
Apache Debug Log from Delphi client:
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 50 bytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): POST /cgi-bin/WESS_WS.dll/soap/IWESS_WS HTTP/1.1\r\n
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 46 bytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): SOAPAction: "urn:WESS_WSIntf-IWESS_WS#Login"\r\n
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 41 bytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Content-Type: text/xml; charset="utf-8"\r\n
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 23 bytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): User-Agent: test 1234\r\n
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 20 bytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Host: tresnak:8080\r\n
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 21 bytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Content-Length: 640\r\n
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 24 bytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Connection: Keep-Alive\r\n
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 25 bytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Cache-Control: no-cache\r\n
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 2 bytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): \r\n
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [readbytes-blocking] 640 readbytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 640 bytes
[Fri Nov 26 07:39:20 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): <?xml version="1.0"?>\r\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><NS1:Login xmlns:NS1="urn:WESS_WSIntf-IWESS_WS"><DBProfile xsi:type="xsd:string">WS test</DBProfile><Username xsi:type="xsd:string">LD</Username><Password xsi:type="xsd:string">ld</Password><Id_Function_Place xsi:type="xsd:int">5</Id_Function_Place></NS1:Login></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(142): mod_dumpio: dumpio_out
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-HEAP): 205 bytes
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-HEAP): HTTP/1.1 200 OK\r\nDate: Fri, 26 Nov 2010 06:39:20 GMT\r\nServer: Apache/2.2.17 (Win32)\r\nContent-Length: 536\r\nKeep-Alive: timeout=5, max=100\r\nConnection: Keep-Alive\r\nContent-Type: text/xml; charset="utf-8"\r\n\r\n
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(142): mod_dumpio: dumpio_out
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-TRANSIENT): 536 bytes
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-TRANSIENT): <?xml version="1.0"?>\r\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><NS1:LoginResponse xmlns:NS1="urn:WESS_WSIntf-IWESS_WS"><LogToken xsi:type="xsd:string">{56B3BC03-9E94-4345-B583-30E4EE71A3D9}</LogToken></NS1:LoginResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-FLUSH): 0 bytes
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(142): mod_dumpio: dumpio_out
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-EOS): 0 bytes
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [eatcrlf-nonblocking] 0 readbytes
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(127): mod_dumpio: dumpio_in - 730035
[Fri Nov 26 07:39:23 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:39:29 2010] [debug] mod_dumpio.c(127): mod_dumpio: dumpio_in - 730060
[Fri Nov 26 07:39:29 2010] [debug] mod_dumpio.c(142): mod_dumpio: dumpio_out
[Fri Nov 26 07:39:29 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-FLUSH): 0 bytes
[Fri Nov 26 07:39:29 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-EOC): 0 bytes
Apache Debug Log from .NET client:
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 50 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): POST /cgi-bin/WESS_WS.dll/soap/IWESS_WS HTTP/1.1\r\n
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 96 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.4952)\r\n
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 39 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Content-Type: text/xml; charset=utf-8\r\n
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 46 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): SOAPAction: "urn:WESS_WSIntf-IWESS_WS#Login"\r\n
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 20 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Host: tresnak:8080\r\n
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 21 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Content-Length: 728\r\n
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 22 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Expect: 100-continue\r\n
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 24 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): Connection: Keep-Alive\r\n
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(113): mod_dumpio: dumpio_in [getline-blocking] 0 readbytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_in (data-HEAP): 2 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_in (data-HEAP): \r\n
[Fri Nov 26 07:41:08 2010] [error] [client 192.168.222.6] Premature end of script headers: WESS_WS.dll
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(142): mod_dumpio: dumpio_out
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-HEAP): 191 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-HEAP): HTTP/1.1 500 Internal Server Error\r\nDate: Fri, 26 Nov 2010 06:41:08 GMT\r\nServer: Apache/2.2.17 (Win32)\r\nContent-Length: 542\r\nConnection: close\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(142): mod_dumpio: dumpio_out
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (data-HEAP): 542 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(74): mod_dumpio: dumpio_out (data-HEAP): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>500 Internal Server Error</title>\n</head><body>\n<h1>Internal Server Error</h1>\n<p>The server encountered an internal error or\nmisconfiguration and was unable to complete\nyour request.</p>\n<p>Please contact the server administrator,\n [email protected] and inform them of the time the error occurred,\nand anything you might have done that may have\ncaused the error.</p>\n<p>More information about this error may be available\nin the server error log.</p>\n</body></html>\n
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-EOS): 0 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(142): mod_dumpio: dumpio_out
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-FLUSH): 0 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(142): mod_dumpio: dumpio_out
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-FLUSH): 0 bytes
[Fri Nov 26 07:41:08 2010] [debug] mod_dumpio.c(55): mod_dumpio: dumpio_out (metadata-EOC): 0 bytes