I have created a WCF WebService having multiple svc files. I call the method in the svc file from vbscript using below code:
ScriptTimeOut = 6000000
Dim soapServer, soapMessage
soapServer = "https://example.com/marketyardwebservice/SchedulerClasses/MailIntimations.svc"
soapMessage = "<s:Envelope xmlns:s=" & GetQuotedUrl("http://schemas.xmlsoap.org/soap/envelope/") & ">" & _
"<s:body>" & _
"<AuctionWinnerSendMail xmlns=" & GetQuotedUrl("http://tempuri.org/") & ">" & _
""
soapMessage = Replace(soapMessage, "'", chr(34))
Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.SetOption 2, xmlhttp.GetOption(2)
Dim lResolve,lConnect,lSend,lReceive
lResolve = 5 * 1000
lConnect = 60 * 1000
lSend = 600 * 1000
lReceive = 600 * 1000
xmlhttp.setTimeouts lResolve, lConnect, lSend, lReceive
xmlhttp.open "POST", soapServer, False
xmlhttp.setRequestHeader "Man", POST & " " & soapServer & " HTTP/1.1"
xmlhttp.setRequestHeader "SOAPAction", "http://tempuri.org/IMailIntimations/AuctionWinnerSendMail"
xmlhttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
xmlhttp.send(soapMessage)
Function GetQuotedUrl(ByVal value)
GetQuotedUrl = Chr(34) & value & Chr(34)
End Function
The above script gets executed properly when https is not enabled. But as soon as I enable HTTPS, I am getting the following error when the vbscript gets executed "A certificate is required to complete client authentication".
Please can anybody help me, as to how i can resolve this issue.
Thanks in advance
When you enable HTTPS on your server set Client Certificates to Ignore.
Related
I am attempting to access the Appointments-Plus.com API via VBA code and am consistently being told I'm giving it an invalid site-id/key. I'm using Access from the Office365 version.
This is the relevant documentation for this API call.
When I use Postman to test out the API, I am able to successfully connect and I get data back. The URL Postman puts together is this:
https://ws.appointment-plus.com/Locations/GetLocations?Authorization:Basic=<site-ID>:<Key>&response_type=xml
My VBA code is this:
Public Sub RESTtestBigURL()
Dim responseType As String
responseType = "response_type=json"
Dim restRequest As WinHttp.WinHttpRequest
Set restRequest = New WinHttp.WinHttpRequest
Dim restResult As String
With restRequest
.Open "POST", "https://ws.appointment-plus.com/Locations/GetLocations?Authorization:Basic=<site-ID>:<Key>&response_type=xml", False
.Send
.WaitForResponse
Debug.Print ".ResponseText: " & .ResponseText
Debug.Print ".Status: " & .Status
Debug.Print ".StatusText: " & .StatusText
Debug.Print ".ResponseBody: " & .ResponseBody
End With
End Sub
I know that the first question is "are you sure you've got the <site-ID> and <key> correct???" Yes - I've copy/pasted the entire URL from Postman into my VBA code, and I've had another couple of pairs of eyeballs review it to confirm that they're still the same.
When I run that code, I get:
.ResponseText: <?xml version="1.0" encoding="utf-8" ?>
<APResponse>
<resource>customers</resource>
<action>getcustomers</action>
<request></request>
<result>fail</result>
<count>0</count>
<errors>
<error><![CDATA[Web Services authentication failed: invalid Site ID or API Key]]></error>
</errors>
</APResponse>
I've tried several other methods of accessing the API, all of which are giving me the same "Invalid ID/Key" error:
Public Sub SecondRESTtestMSXML()
Dim restRequest As MSXML2.XMLHTTP60
Set restRequest = New MSXML2.XMLHTTP60
With restRequest
.Open "GET", URL & REQUEST_GET_LOCATIONS, True
.SetRequestHeader "Authorization", "Basic" & SITE_ID & ":" & API_KEY
.SetRequestHeader "response_type", "xml"
.SetRequestHeader "Accept-Encoding", "application/xml"
.Send "{""response_type"":""JSON""&""location"":""582""}"
While .ReadyState <> 4
DoEvents
Wend
Debug.Print ".ResponseText: " & .ResponseText
Debug.Print ".Status: " & .Status
Debug.Print ".StatusText: " & .StatusText
Debug.Print ".ResponseBody: " & .ResponseBody
End With
End Sub
There is a suggestion that this is a duplicate of another question that was resolved by Base64-encoding. However, this method, while it wasn't explicit, shows that I have attempted that, too. I've added the Base64Encode function code that is called from here.
Public Sub RESTtest()
Dim restRequest As WinHttp.WinHttpRequest
Set restRequest = New WinHttp.WinHttpRequest
Dim restResult As String
With restRequest
.Open "POST", URL & REQUEST_GET_LOCATIONS, True
.SetRequestHeader "Authorization", "Basic " & SITE_ID & ":" & Base64Encode(API_KEY)
' Note call to Base64Encode() on this line ---------------- ----- ^^^^^^^^^^^^
.Option(WinHttpRequestOption_EnableRedirects) = False
.Send "{""response_type"":""JSON""}"
.WaitForResponse
Debug.Print ".ResponseText: " & .ResponseText
Debug.Print ".Status: " & .Status
Debug.Print ".StatusText: " & .StatusText
Debug.Print ".ResponseBody: " & .ResponseBody
End With
End Sub
Public Function Base64Encode(ByVal inputText As String) As String
Dim xmlDoc As Object
Dim docNode As Variant
Set xmlDoc = CreateObject("Msxml2.DOMDocument.3.0")
Set docNode = xmlDoc.createElement("base64")
docNode.DataType = "bin.base64"
docNode.nodeTypedValue = Stream_StringToBinary(inputText)
Base64Encode = docNode.Text
Set docNode = Nothing
Set xmlDoc = Nothing
End Function
Notes:
URL, REQUEST_GET_LOCATIONS, SITE_ID, and API_KEY are constants declared globally in this module for testing purposes. They, too, have all been copy/pasta'd and reviewed by several people for typos.
You may note that there are requests for responses in both XML and JSON - they're both giving me the same response.
I do have a support ticket open with Appt Plus, but I'm hoping I might get a faster response here.
Are there any obvious errors that anyone sees in this code? Are there any suggestions for other methods to attempt to call the API and get results? I've had a suggestion to write a DLL in C# and call that, however, I don't have the time to learn enough C# to make that happen, so switching languages isn't really an option here.
Additional notes:
I tried this using curl in a Powershell session, and it gives me the same result:
PS H:\> curl -method Post -uri "https://ws.appointment-plus.com/Locations/GetLocations?Authorization:Basic=<ID>:<key>&response_type=json"
The result:
StatusCode : 200
StatusDescription : OK
Content : {"resource":"locations",
"action":"getlocations",
"request":"",
"result":"fail",
"count":"0"
,"errors":[
"Web Services authentication failed: invalid Site ID or API ...
RawContent : HTTP/1.1 200 OK
Pragma: no-cache
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Date: Mon, 26 Aug 2019 17:28:41 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Set-Cooki...
Forms : {}
Headers : {[Pragma, no-cache], [Cache-Control, no-store, no-cache, must-revalidate, post-check=0,
pre-check=0], [Date, Mon, 26 Aug 2019 17:28:41 GMT], [Expires, Thu, 19 Nov 1981 08:52:00 GMT]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 207
Per the exchanges in the comments, the main issue appears to be how the basic authorization header was being formed.
For future readers, the format for the authorization header is:
.SetRequestHeader "Authorization", "Basic " & Base64Encode(SITE_ID & ":" & API_KEY)
Also, another issue you may run into is related here. Linebreaks are inserted into the Base64 encoded string with the current approach, which won't play nice with most (if not all) APIs. A suggested fix for this would be something like:
Public Function Base64Encode(ByVal inputText As String, Optional removeBlankLines = True) As String
Dim xmlDoc As Object
Dim docNode As Variant
Set xmlDoc = CreateObject("Msxml2.DOMDocument.3.0")
Set docNode = xmlDoc.createElement("base64")
docNode.DataType = "bin.base64"
docNode.nodeTypedValue = Stream_StringToBinary(inputText)
Base64Encode = docNode.Text
Set docNode = Nothing
Set xmlDoc = Nothing
'remove blank line characters ASCII --> 10,13,10 + 13
If removeBlankLines Then Base64Encode = Replace(Replace(Replace(Base64Encode, vbCrLf, vbNullString), vbLf, vbNullString), vbCr, vbNullString)
End Function
I originally created a VBA macro that would uses IE automation to click specific form buttons on an ASPX page. The page has 5 form options you have to pass through.
drop down list for group
drop down list for location
Graphical calendar where you select the date
List box for area's
Generate Report button
I would like to move away from using the IE automation to something more efficient. I have seen other posts where they were able to pull the data back using the MSXML object. This is what I was able to build from what I read but am not having any luck figuring out how to pass more than one of the form options. This is a company specific/internal website so unfortunately it is not available externally for me to be able to post the link example.
The element ID's are as follows; dlDivision, dlLocation, calRptDate, lbAreas, btnGenReport.
Public Sub XMLhttp_Search_Extract()
Dim URL As String
Dim XMLreq As Object
Dim POSTdata As String
Dim i As Integer
URL = "somewebURL.test.aspx"
POSTdata = "(" & Q("dlDivision") & ":" & Q("divisionNAMEHERE") & "," & Q("dlLocation") & ":" & Q("123 - Location") & ")"
Set XMLreq = CreateObject("MSXML2.XMLHTTP")
With XMLreq
.Open "POST", URL, False
.setRequestHeader "User-Agent", "Moilla/5.0 (Windows NT 5.1; rv:23.0) Gecko/20100101 Firefox/23.0"
.setRequestHeader "Referer", "somewebURL.test.aspx"
.setRequestHeader "Content-Type", "application/json; charset=utf-8"
.Send (POSTdata)
For i = 1 To Len(.responseText) Step 1023
MsgBox Mid(.responseText, i, i + 1023), _
Title:=i & " to " & Min(i + 1023 - 1, Len(.responseText)) & " of " & Len(.responseText)
Next i
End With
End Sub
Private Function Q(text As String) As String
Q = Chr(34) & text & Chr(34)
End Function
Private Function Min(n1 As Long, n2 As Long) As Long
Min = IIf(n1 < n2, n1, n2)
End Function
I'm trying to pass textbox values from an Outlook userform to an asmx web service. I've done this successfully with PHP but now need to do so with VBA. Currently the form does absolutely nothing on submit. I believe something is wrong with what or how I'm passing to the send method. Any suggestions how I can get this to work?
CliAcctNo = TicketCreateForm1.CliAcctNo.Value
ContactName = TicketCreateForm1.ContactName.Value
ContactNum = TicketCreateForm1.ContactNum.Value
Ext = TicketCreateForm1.Ext.Value
Email = TicketCreateForm1.Email.Value
TicketTitle = TicketCreateForm1.TicketTitle.Value
TicketDesc = TicketCreateForm1.Desc.Value
'DataToPost = ("cliacctno=44121&pname=John&pnum=404-223-9655&ext=0&emailaddress=john#noemail.com&tickettitle=test from vab&ticketdetails=test line item vba")
'objEvn.Parameters.Create "Test", "Test"
DataToPost = ("CliAcctNo&ContactName&ContactNum&Ext&Email&TicketTitle&TicketDesc")
Set objHttp = New MSXML2.XMLHTTP
'Set objHttp = New MSXML2.XMLHTTPRequest
objHttp.Open "POST", "http://localhost/test/test.asmx"
objHttp.setRequestHeader "Content-Type", "text/xml"
'objHttp.setRequestHeader "SOAPAction", "CreateTicket"
objHttp.setRequestHeader "SOAPAction", "tempri.org/CreateTicket"
objHttp.Send (DataToPost)
In your posted code you're sending a fixed string to the web service: you need to somehow include your parameters in that -
CliAcctNo = TicketCreateForm1.CliAcctNo.Value
ContactName = TicketCreateForm1.ContactName.Value
ContactNum = TicketCreateForm1.ContactNum.Value
Ext = TicketCreateForm1.Ext.Value
Email = TicketCreateForm1.Email.Value
TicketTitle = TicketCreateForm1.TicketTitle.Value
TicketDesc = TicketCreateForm1.Desc.Value
'DataToPost = ("cliacctno=44121&pname=John&pnum=404-223-9655&ext=0&emailaddress=john#noemail.com&tickettitle=test from vab&ticketdetails=test line item vba")
DataToPost = "cliacctno=" & CliAcctNo & _
"pname=" & ContactName & _
"pnum=" & ContactNum & _
"ext=" & Ext & _
"emailaddress=" & Email & _
"tickettitle=" & TicketTitle & _
"ticketdetails=" & TicketDesc
I have tried to do access the SM API through VBA. I have left out the JSON for now as I am already in trouble. The below is giving me "Developer Inactive" as a result, though I have another project in VB.NET (using a .NET DLL) where the same key and token works fine and I can retrieve the list of surveys.
What am I doing wrong?
Public Sub GetSMList()
Dim apiKey As String
Dim Token As String
Dim sm As Object
apiKey = "myKey"
Token = "myToken"
Set sm = CreateObject("MSXML2.XMLHTTP.6.0")
With sm
.Open "POST", "https://api.surveymonkey.net/v2/surveys/get_survey_list", False
.setRequestHeader "Authorization", "Bearer " & Token
.setRequestHeader "Content-Type", "application/json"
.send "api_key=" & apiKey
result = .responseText
End With
End Sub
You're sending your API key as part of the request body of your POST request. Add the query parameter to the URL directly and this should work.
"https://api.surveymonkey.net/v2/surveys/get_survey_list?api_key=" & apiKey
You'll then need to use "send" to send a JSON encoded request object. For get_survey_list, an empty object ("{}") will get your started.
The purpose of this code is to show error handling. This is vbscript but vbscript is pastable into VBA. The error will probably tell you why.
ALWAYS DO ERRORS on files (users delete them), networking or internet (they are not guaranteed to work), and registry reads (users delete them).
The URL has to be 100% correct. Unlike a browser there is no code to fix urls.
The purpose of my program is to get error details.
How I get a correct URL is to type my url in a browser, navigate, and the correct URL is often in the address bar. The other way is to use Properties of a link etc to get the URL.
Also Microsoft.XMLHTTP maps to Microsoft.XMLHTTP.1.0. HKEY_CLASSES_ROOT\Msxml2.XMLHTTP maps to Msxml2.XMLHTTP.3.0. Try a later one
Try this way using xmlhttp. Edit the url's etc. If it seems to work comment out the if / end if to dump info even if seeming to work. It's vbscript but vbscript works in vb6.
On Error Resume Next
Set File = WScript.CreateObject("Microsoft.XMLHTTP")
File.Open "GET", "http://www.microsoft.com/en-au/default.aspx", False
'This is IE 8 headers
File.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C; .NET4.0E; BCD2000; BCD2000)"
File.Send
If err.number <> 0 then
line =""
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "Error getting file"
Line = Line & vbcrlf & "=================="
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "Error " & err.number & "(0x" & hex(err.number) & ") " & err.description
Line = Line & vbcrlf & "Source " & err.source
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "HTTP Error " & File.Status & " " & File.StatusText
Line = Line & vbcrlf & File.getAllResponseHeaders
wscript.echo Line
Err.clear
wscript.quit
End If
On Error Goto 0
Set BS = CreateObject("ADODB.Stream")
BS.type = 1
BS.open
BS.Write File.ResponseBody
BS.SaveToFile "c:\users\test.txt", 2
Also see if these other objects work.
C:\Users>reg query hkcr /f xmlhttp
HKEY_CLASSES_ROOT\Microsoft.XMLHTTP
HKEY_CLASSES_ROOT\Microsoft.XMLHTTP.1.0
HKEY_CLASSES_ROOT\Msxml2.ServerXMLHTTP
HKEY_CLASSES_ROOT\Msxml2.ServerXMLHTTP.3.0
HKEY_CLASSES_ROOT\Msxml2.ServerXMLHTTP.4.0
HKEY_CLASSES_ROOT\Msxml2.ServerXMLHTTP.5.0
HKEY_CLASSES_ROOT\Msxml2.ServerXMLHTTP.6.0
HKEY_CLASSES_ROOT\Msxml2.XMLHTTP
HKEY_CLASSES_ROOT\Msxml2.XMLHTTP.3.0
HKEY_CLASSES_ROOT\Msxml2.XMLHTTP.4.0
HKEY_CLASSES_ROOT\Msxml2.XMLHTTP.5.0
HKEY_CLASSES_ROOT\Msxml2.XMLHTTP.6.0
End of search: 12 match(es) found.
Also be aware there is a limit on how many times you can call any particular XMLHTTP object before a lockout occurs. If that happens, and it does when debugging code, just change to a different xmlhttp object
I am attempting to pull the info that the following site pulls: http://gis.calhouncounty.org/ParcelViewer/index.html. If you type in PPIN 66078 and then click Property Taxes, it will bring up data. I am attempting to recreate this SOAP request in VBA, but unsuccessfully. It calls the service, but all data in the response is blank. I got so frustrated that I even recreated the full header set, to no avail. Maybe there is a cookie issue, but the cookies on my computer don't seem to expire quickly. Here's what I have in the extract:
URL = "http://gis.calhouncounty.org/wsCalhounParcel2/Inquiry.asmx?WSDL"
method = "getTaxBill"
parcel = Range("A" & currentrow).Value
SoapRequest = SoapRequest & "<?xml version=""1.0"" encoding=""utf-8""?><soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""> "
SoapRequest = SoapRequest & "<soap:Body>"
SoapRequest = SoapRequest & "<tns:" & method & " xmlns:tns=""http://gis.calhouncounty.org"">"
SoapRequest = SoapRequest & "<tns:PPIN>" & parcel & "</tns:PPIN>"
SoapRequest = SoapRequest & "</tns:" & method & ">"
SoapRequest = SoapRequest & "</soap:Body>"
SoapRequest = SoapRequest & "</soap:Envelope>"
Set objHTTP = CreateObject("Msxml2.XMLHTTP")
objHTTP.Open "POST", URL, False
objHTTP.setRequestHeader "Host", "gis.calhouncounty.org"
objHTTP.setRequestHeader "Connection", "keep-alive"
objHTTP.setRequestHeader "Content-Length", SoapRequestLen
objHTTP.setRequestHeader "Origin", "http://gis.calhouncounty.org"
objHTTP.setRequestHeader "X-Requested-With", "ShockwaveFlash/17.0.0.169"
objHTTP.setRequestHeader "SOAPAction", "http://gis.calhouncounty.org/" & method
objHTTP.setRequestHeader "User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36"
objHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
objHTTP.setRequestHeader "Accept", "*/*"
objHTTP.setRequestHeader "Referer", "http://gis.calhouncounty.org/ParcelViewer"
objHTTP.setRequestHeader "Accept-Encoding", "gzip, deflate"
objHTTP.setRequestHeader "Accept-Language", "en-US,en;q=0.8"
objHTTP.setRequestHeader "Cookie", "ASPSESSIONIDAABARSAB=DIIJLAGCFJKDFKBCDNMMLEIB; ASPSESSIONIDAAACQSBA=BKAJPFCDCAJLBAKFFBACBMGC; ASPSESSIONIDCCCBRTBA=DKJPBAPDNLIFBOJGCPEDMAHG; __utma=262294995.1570768928.1429018531.1429018531.1430173329.2; __utmc=262294995; __utmz=262294995.1430173329.2.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); ASPSESSIONIDAQTRATAB=OHCBMBMCNALFKOCODDMIAHIA; _ga=GA1.2.90452212.1429018592; __utmt=1; __utma=167846455.90452212.1429018592.1430173349.1430248358.4; __utmb=167846455.1.10.1430248358; __utmc=167846455; __utmz=167846455.1430173349.3.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)"
objHTTP.send SoapRequest
Any help is incredibly appreciated!
-Andy
You are not error checking. Adapt the following error checking to your code. err.number, err.description, err.source, file.status, file.statustext, file.getallresponseheaders.
The URL has to be 100% correct. Unlike a browser there is no code to fix urls.
The purpose of my program is to get error details.
How I get a correct URL is to type my url in a browser, navigate, and the correct URL is often in the address bar. The other way is to use Properties of a link etc to get the URL.
Also Microsoft.XMLHTTP maps to Microsoft.XMLHTTP.1.0. HKEY_CLASSES_ROOT\Msxml2.XMLHTTP maps to Msxml2.XMLHTTP.3.0. Try a later one
Try this way using xmlhttp. Edit the url's etc. If it seems to work comment out the if / end if to dump info even if seeming to work. It's vbscript but vbscript works in vb6.
On Error Resume Next
Set File = WScript.CreateObject("Microsoft.XMLHTTP")
File.Open "GET", "http://www.microsoft.com/en-au/default.aspx", False
'This is IE 8 headers
File.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C; .NET4.0E; BCD2000; BCD2000)"
File.Send
If err.number <> 0 then
line =""
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "Error getting file"
Line = Line & vbcrlf & "=================="
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "Error " & err.number & "(0x" & hex(err.number) & ") " & err.description
Line = Line & vbcrlf & "Source " & err.source
Line = Line & vbcrlf & ""
Line = Line & vbcrlf & "HTTP Error " & File.Status & " " & File.StatusText
Line = Line & vbcrlf & File.getAllResponseHeaders
wscript.echo Line
Err.clear
wscript.quit
End If
On Error Goto 0
Set BS = CreateObject("ADODB.Stream")
BS.type = 1
BS.open
BS.Write File.ResponseBody
BS.SaveToFile "c:\users\test.txt", 2
Also see if these other objects work.
C:\Users>reg query hkcr /f xmlhttp
HKEY_CLASSES_ROOT\Microsoft.XMLHTTP
HKEY_CLASSES_ROOT\Microsoft.XMLHTTP.1.0
HKEY_CLASSES_ROOT\Msxml2.ServerXMLHTTP
HKEY_CLASSES_ROOT\Msxml2.ServerXMLHTTP.3.0
HKEY_CLASSES_ROOT\Msxml2.ServerXMLHTTP.4.0
HKEY_CLASSES_ROOT\Msxml2.ServerXMLHTTP.5.0
HKEY_CLASSES_ROOT\Msxml2.ServerXMLHTTP.6.0
HKEY_CLASSES_ROOT\Msxml2.XMLHTTP
HKEY_CLASSES_ROOT\Msxml2.XMLHTTP.3.0
HKEY_CLASSES_ROOT\Msxml2.XMLHTTP.4.0
HKEY_CLASSES_ROOT\Msxml2.XMLHTTP.5.0
HKEY_CLASSES_ROOT\Msxml2.XMLHTTP.6.0
End of search: 12 match(es) found.
Also be aware there is a limit on how many times you can call any particular XMLHTTP object before a lockout occurs. If that happens, and it does when debugging code, just change to a different xmlhttp object
I get this running your code.
---------------------------
Windows Script Host
---------------------------
Error 0(0x0)
Source
HTTP Error 200 OK
Date: Tue, 28 Apr 2015 21:56:46 GMT
Server: Microsoft-IIS/7.5
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Access-Control-Allow-Origin: *
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
---------------------------
OK
---------------------------
Then I msgbox out responsebody and I have data sending cat rather than what's in your spreadsheet.