Felix18807
Programmer
I am trying to make a SOAP Call to the reallysimplesystems API. I am unfamiliar with this process but I have spent time searching the internet and looking for ways to do this on various forums. The general view seems to be that the Microsoft SOAP toolkit is outdated and no longer supported (I'm using MSAccess 2010).
If you are familiar with this process could you have a look at my code below and see if I have made any silly mistakes?
Thanks In Advance
Dim URL As String
Dim envelope As String
Dim strXML As String
URL = " strXML = "<?xml version=""1.0"" encoding=""utf-8""?>" & _
"<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="" & _
"<soap:Body>" & _
"<GetAccountById xmlns=""ReallySimple"">" & _
"<CustomerId>XXXXX</CustomerId>" & _
"<APIPassword>XXXXX</APIPassword>" & _
"<AccountId>470612</AccountId>" & _
"</GetAccountById>" & _
"</GetAccounts>" & _
"</soap:Body>" & _
"</soap:Envelope>"
envelope = strXML
http.setTimeouts 30000, 30000, 30000, 30000
Call http.Open("POST", URL)
http.setRequestHeader "Host", "webtrans.reallysimplesystems.com"
http.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
' http.setRequestHeader "Content-Length", Len(strXML)
http.setRequestHeader "SOAPAction", "ReallySimple/GetAccountById"
http.Send envelope
txtXML.value = Replace(Replace(Replace(http.responseText, "<", vbCrLf), ">", ""), "/", "")
If you are familiar with this process could you have a look at my code below and see if I have made any silly mistakes?
Thanks In Advance
Dim URL As String
Dim envelope As String
Dim strXML As String
URL = " strXML = "<?xml version=""1.0"" encoding=""utf-8""?>" & _
"<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="" & _
"<soap:Body>" & _
"<GetAccountById xmlns=""ReallySimple"">" & _
"<CustomerId>XXXXX</CustomerId>" & _
"<APIPassword>XXXXX</APIPassword>" & _
"<AccountId>470612</AccountId>" & _
"</GetAccountById>" & _
"</GetAccounts>" & _
"</soap:Body>" & _
"</soap:Envelope>"
envelope = strXML
http.setTimeouts 30000, 30000, 30000, 30000
Call http.Open("POST", URL)
http.setRequestHeader "Host", "webtrans.reallysimplesystems.com"
http.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
' http.setRequestHeader "Content-Length", Len(strXML)
http.setRequestHeader "SOAPAction", "ReallySimple/GetAccountById"
http.Send envelope
txtXML.value = Replace(Replace(Replace(http.responseText, "<", vbCrLf), ">", ""), "/", "")