Sub TABcall()
Dim xmlHtp As New MSXML2.XMLHTTP
Dim sURL As String
Dim sEnv As String
Dim XMLDOC As New DOMDocument
sURL = "https://api.tab.com.au/tabapi/services/thirdPartyAuthenticate"
sEnv = <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.thirdparty.api.neo.tabcorp.com.au/">
sEnv = sEnv & "<soapenv:header>"
sEnv = sEnv & "<soapenv:body>"
sEnv = sEnv & "<ser:authenticateaccount>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "<apimeta>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "<jurisdictionid>1</jurisdictionid>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "<requestchannel>5</requestchannel>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "</apimeta>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "<authrequest>"
sEnv = sEnv & "<accountid>accountid</accountid>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "<accountpassword>password</accountpassword>"
sEnv = sEnv & "</authrequest>"
sEnv = sEnv & "</ser:authenticateaccount>"
sEnv = sEnv & "</soapenv:body>"
sEnv = sEnv & "</soapenv:header></soapenv:envelope>"
With xmlHtp
.Open "POST", sURL, False
.setRequestHeader "Host", ""
.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
.setRequestHeader "soapAction", "QueryCSV" ' per the documentation
.send sEnv
XMLDOC.LoadXML .responseText
'XMLDOC.Save ActiveWorkbook.Path & "\WebQueryResult2.xml"
End With
MsgBox xmlHtp.statusText
End Sub
Dim xmlHtp As New MSXML2.XMLHTTP
Dim sURL As String
Dim sEnv As String
Dim XMLDOC As New DOMDocument
sURL = "https://api.tab.com.au/tabapi/services/thirdPartyAuthenticate"
sEnv = <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.thirdparty.api.neo.tabcorp.com.au/">
sEnv = sEnv & "<soapenv:header>"
sEnv = sEnv & "<soapenv:body>"
sEnv = sEnv & "<ser:authenticateaccount>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "<apimeta>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "<jurisdictionid>1</jurisdictionid>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "<requestchannel>5</requestchannel>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "</apimeta>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "<authrequest>"
sEnv = sEnv & "<accountid>accountid</accountid>"
sEnv = sEnv & "<!--Optional:-->"
sEnv = sEnv & "<accountpassword>password</accountpassword>"
sEnv = sEnv & "</authrequest>"
sEnv = sEnv & "</ser:authenticateaccount>"
sEnv = sEnv & "</soapenv:body>"
sEnv = sEnv & "</soapenv:header></soapenv:envelope>"
With xmlHtp
.Open "POST", sURL, False
.setRequestHeader "Host", ""
.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
.setRequestHeader "soapAction", "QueryCSV" ' per the documentation
.send sEnv
XMLDOC.LoadXML .responseText
'XMLDOC.Save ActiveWorkbook.Path & "\WebQueryResult2.xml"
End With
MsgBox xmlHtp.statusText
End Sub