views:

246

answers:

2

Hi,

we are developing a SOAP webservice (Apache/PHP). All run well for small size calls, but with a 1Mb soap call (the HTTPS call size is 1MB) our Delphi Soap client stop with a timeout on all PC but one, and our PHP clients run well with a default_socket_timeout=300, but stop with a "Error Fetching http headers" with default_socket_timeout=60.

How can we change the timeout for Delphi? In fact this timeout seem to be in a Windows XP network library (wininet.dll called by soaphttptrans.pas)

Thanks
Cédric

+2  A: 

There's a MaxSinglePostSize in SOAPHttpTrans. I seem to recall having issues with that. This isn't a limit, but it behaves differently (breaks up into chunks for sending) if you're over, or under that limit. (basically 32768 by default). I expect you'll hit that size sooner if you're on D2009/D2010 due to widestrings. It would be interesting to see if you run into trouble around that size. You can use Fiddler to capture some output (or hook into the OnBeforePost event and dump the serialized XML to a file yourself) and see if that's where you run into trouble, instead of the previously observed 1MB.

But anyway, the THTTPReqResp class has options for SendTimeout and ReceiveTimeout. Try adjusting those.

Also... if you are using Delphi prior to Delphi2007, you should update your soap libraries. There's a download somewhere... many bug fixes, including a nasty memory issue that will cause your app to be halted by DEP.

Chris Thornton
Another thing to consider.... Try running the payload through SoapUI. SoapUI uses a different communication stack (Java-based) instead of WinInet. If you have the same result, the you know it's probably something going wrong at the server, or an intermediary such as a firewall, proxy, ESB, etc.. not the client.
Chris Thornton
+2  A: 

In fact it was a problem with IE7 installation : it change all the network timeout.

PC with IE6 have a 3600 secondes timeout, IE7 change it to 30 secondes. Use of InternetQueryOption() show this, and InternetSetOption help to change this.

Big thanks to my work mate wich hunt the bug for hours.

Cédric Girard