SOAP Error : Handle in wrong state
We recently upgraded our c++ client using Embaracadero Tokyo 10.2 C++ Builder Update 1. The client is using our own web service which has not been upgraded and built using Borland/Codegear C++ Builder. We have tested and deployed the client. In production, under certain situations (mainly slower connections), we are getting this error message. Looks like this message is displayed when our backend/database operation crosses 30 seconds at which point we are supposed to see a time out message. Instead this error is shown. Not sure how to trouble shoot this issue. Is there a possibility of incorrect handling of error messages between the client and the web service. We never had this issue with our old client compiled using Codegear C++ Builder.
I had a similar problem with after recompiling an application in Delphi 10.2. The most relevant information I found was here: http://www.codenewsfast.com/cnf/article/0/permalink.art-ng1892q144
I increased the timeout on the web service calls by replacing this
WebSvcClient := GetWebSvcPortType( False, WebSvcURL);
RIO := THTTPRIO.Create(nil); RIO.HTTPWebNode.ReceiveTimeout := 60000; WebSvcClient := GetWebSvcPortType( False, WebSvcURL, RIO);
where GetWebSvcPortType is in the Delphi-generated unit for the web service. The timeout is in milliseconds.
Hope this helps.