Hi, I'm new here and didn't find a topic that would help me figure out my problem.
After a customizatino and a simple test with the example SOAP\ConvertClientBasic app I made a copy to use it as part of my app and added code to create the XML. The problem is that the app can make the connection correctly and receives the response just fine but seems like it keeps wating for the connection to be closed, even if I close the app the process is still running until I kill the process from the task manager. Could be an infinit loop? I keep getting a timeout message even after receiving the response from the server, over and over again while the app is open. I attached a nettalk log and hope someone can help figure it out, it shows that even after closing the app it keeps writing to the log until I kill the process. Could this be related to how the connection is setup? This didn't happen with the simple test and I'm using the same code for the conection. This is the code:
cSoap.SetAllHeadersDefault()
cSoap.ConnectionKeepAlive = 0
cSoap.CanUseProxy = 0 ! Can use a proxy
cSoap.HeaderOnly = 0 ! We want the whole page
cSoap.AsyncOpenUse = 1 ! Use AsyncOpen 12 seconds (recommended)
cSoap.AsyncOpenTimeOut = 1200 ! Up to 12 seconds to connect
cSoap.InActiveTimeout = 9000 ! Set IdleTimeout
cSoap.Pragma_ = 'No-Cache' ! Force any proxies to not use their cache. Uses more bandwidth but will contact the webserver directly which is what we want.
cSoap.CacheControl = 'No-Cache'! Force any proxies to not use their cache. Uses more bandwidth but will contact the webserver directly which is what we want.
! These settings would be required if you were talkig to a SOAP server that only did SSL.
cSoap.SSLCertificateOptions.CertificateFile = ''
cSoap.SSLCertificateOptions.PrivateKeyFile = ''
cSoap.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1
cSoap.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 1
cSoap.SSLCertificateOptions.CARootFile = '' !If https use a root cluster like '.\CA_Roots.pem'
cSoap.ContentType = 'text/xml; charset=windows-1252'
cSoap.AcceptEncoding = ''
cSoap.ContentLength = Len(Clip(PostString))
! Set the SOAPAction header to tell the web service which method to execute
cSoap.customheader = 'SOAPAction: "
https://www.fel.mx/ConexionRemotaCFDI/generarCFDIPrueba"'
SetCursor(Cursor:Wait)
! The packet is contstructed, so you can post it to the webservice
PacketSent = PostString
SETCLIPBOARD(clip(PostString))
cSoap.Post('
https://www.fel.mx/ConexionRemotaCFDI/ConexionRemota.asmx', Clip(PostString))
If cSoap.Error
Message ('Could not be post the SOAP request to this web service. Error ' & cSoap.Error |
& ': ' & cSoap.InterpretError())
SetCursor()
end
!! end of code
Thank you
[attachment deleted by admin]