Here is a simple example for your request:
Code:
Set x = CreateObject("MSXML2.DOMDocument")
Set y = CreateObject("MSXML2.DOMDocument")
Set z = CreateObject("MSXML2.DOMDocument")
x.Load (App.Path & "\Request.xml")
Set h = CreateObject("MSXML2.ServerXMLHTTP")
While (Val(DateDiff("s", GetTimeBeforePost, Now)) <= moFinalResponseTime) And h.readyState <> 4
moErrorLogger.LogInformation "Posting the Soap HTTP request...."
'TCS Changes to catch the exception when the web server is down
On Error Resume Next
GetTimeBeforePostNew = Now
h.Open "POST", sURL, True
h.send x
h.waitForResponse (moResponseTime)
If h.readyState <> 4 Then
'Waits for 10 min
While Val(DateDiff("s", GetTimeBeforePostNew, Now)) <= moResponseTime
Wend
h.abort
End If
Wend
Bookmarks