Hello,
It is possible to set a timeout request for a web service request? I added to IF oHttp:status=200 to check status but sometimes request hangs.
TRY
oHttp := CreateObject( 'MSXML2.XMLHTTP' )
CATCH
oHttp := CreateObject( 'Microsoft.XMLHTTP' )
END
cHttpSend := [<?xml version="1.0"?>]
cHttpSend += [<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:abc.com:05-OfferToCash:40-LogisticDelivery">]
cHttpSend += [ <soapenv:Header/>]
cHttpSend += [ <soapenv:Body>]
cHttpSend += [ <urn:FindRFIDQry>]
cHttpSend += [ <!--Optional:-->]
cHttpSend += [ <Header>]
cHttpSend += [ <!--Optional:-->]
cHttpSend += [ <Document>] + cSDNo + [</Document>]
cHttpSend += [ <!--Optional:-->]
cHttpSend += [ <OutboundDelivery></OutboundDelivery>]
cHttpSend += [ </Header>]
cHttpSend += [ </urn:FindRFIDQry>]
cHttpSend += [ </soapenv:Body>]
cHttpSend += [</soapenv:Envelope>]
oHttp:Open( 'POST', cURL, .F. )
oHttp:SetRequestHeader( "Content-Type","application/xml")
oHttp:SetRequestHeader( "Accept","*/*")
oHttp:SetRequestHeader( "Authorization", "Basic "+hb_base64Encode(cCred))
oHttp:Send( cHttpSend )
Sysrefresh()
IF oHttp:status=200
cWinResp := oHttp:ResponseBody
ENDIF