PROBLEMS! Posting Form Fields with XMLHTTP
Ok -- I can not figure this out. I am trying to post a large XML string to another url. I have been doing this previously in cold fusion but am trying to get all of my code up to date and it wont work in ASP. It should be very simple:
xml = Server.URLEncode(refi1_doc)
pingUrl = "https://xxx.xxxxxxx.com/b2b/incoming.asp"
set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlHttp.Open "POST", pingUrl, False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
This should just be URLEncoding the xml document and posting it. I am getting a "Bad XML" response - line 0, position 0 -- but I KNOW the xml string is well formed -- have already tested that. The guy on that end who was trying to help me stated that the string MUST be in a form field named "xml" (all lowercase) and it has to be a post -- that's it! Isn't that what I am doing? I even tried adding to the end of the URL:
pingUrl = "https://xxx.xxxxxxx.com/b2b/incoming.asp?xml="
Nothing is working. How do I specify that the data being sent is in a form field called "xml"? Anyone know what is going on here?