With Object ::oServerWS
nResolve = 5 * 1000
nConnect = 5 * 1000
nSend = 15 * 1000
nReceive = 15 * 1000
cSOAPAction := "http://tempuri/RevertePagamentoLoteOP"
:SetTimeouts( nResolve, nConnect, nSend, nReceive )
:Open( "POST", ::cUrlWS, .F. )
:setRequestHeader( "SOAPAction", cSOAPAction )
:SetRequestHeader( "Content-Type", 'text/xml; charset="utf-8"' )
:SetRequestHeader( "Content-Length", hb_NtoS( hb_BLen( cXMLSoap ) ) )
:Send( ::oXMLDoc:xml )
Do While :readyState != 4
hwg_DoEvents()
:WaitForResponse( 500 )
Enddo
::cResponseText := :responseText
End
Definir timeout para resquest
https://stackoverflow.com/questions/14052543/how-to-set-http-timeout-using-asp