HTTP Server and gSOAP: no results

Giganews Newsgroups
Subject: HTTP Server and gSOAP: no results
Posted by:  Jens (j…@bruker.de)
Date: Thu, 17 Aug 2006

Hi,

I have migrated my standalone SOAP server vom Indy9(Delphi7) to Indy10(Delphi2006). Since this migration I get no results with a gSOAP client. I have no problems with a Delphi SOAP Client or other software. I did some investigations now for 4 days. I read the indy faqs and I did some source code debugging in Delphi7 and Delphi2006.

When I set a breakpoint at the beginning of method DoExecute of TidCustomHTTPServer, the HTTP Server with gSOAP has got the status CLOSE_WAIT (netstat). All other clients(Delphi SOAP Client, IE, Firefox) have the status ESTABLISHED (netstat) as expected.

I read the Microsoft article "TCP Connection States and Netstat Output". The explanation for CLOSE_WAIT is, that the client has immediatly sent a FIN (active close) after sending the request. The connection is only half closed. Data can be still received from the HTTP server.

This mode seems not to work with Indy10. With Indy9 I had no problems. When debugging Indy9 and Indy10 I found the difference between these 2 versions. The implementation of TIdTCPConnection.Connected is different. Indy9 only asks if the socket is still valid. Indy10 asks if the socket is valid and trys to read some new data. If the result of the amount of read data is 0 it sets the flag fCloseGracefully to TRUE. This will raise the exception ConnectionClosedGracefully. So this will prevent the sending of the result data back to the client although the client is still listening for results.

I think that this behaviour is a bug and I hope to get an answer if this is wanted or if there are any other flags so set to resolve the problem.

Thanks,
  Jens.

Replies