MSXML Object Required Error???
Ok, I am somewhat new to this object and am totally confused at this point, any help would be wonderful! I am using VBScript and ASP to attempt to parse an xml packet that was posted to my site from a number of various domains. The post from the other sites look like this:
xmlDoc = "<?xml version=""1.0"" encoding=""UTF-8""?>" & _
"<PINGXB_REQUEST>"
"<Lead_Metadata>" & _
"<LEAD_ID>12345678A</LEAD_ID>" & _
""</Lead_Metadata>" & _
"</PINGXB_REQUEST>"
set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
xmlHttp.Open "POST", pingUrl, False
xmlhttp.setRequestHeader "Content-Type", "text/xml"
xmlHttp.Send xmlDoc
Simple and straight forward right? The pingUrl is the url to the below script and the xmlDoc is just a well formed xml string...
So in my page, I have the following in place to accept and parse (just showing 1 node here as an example but there are many single nodes to parse):
set xmlObj = Server.CreateObject("Msxml2.DomDocument.4.0")
xmlObj.async = False
xmlObj.validateOnParse = False
xmlObj.setProperty "ServerHTTPRequest", True
xmlObj.setProperty "SelectionLanguage","XPath"
bLoaded = xmlObj.load(Request)
If bLoaded Then
set lead_id = xmlObj.selectSingleNode("//Lead_Metadata/LEAD_ID").text
Else
'invalid xml error
End if
When this gets ran I get a "Object required" error?
PLEEEEEEEEEEASE, someone show me the way!
Thanks.
|