rivkamak
asked on
reading correct node from SOAP
I have a returned SOAP I am trying to pull out the text out of the nodes using classic ASP.
I am hitting an error. How can I get the Tin_code out of the xml?
The soap looks like this.
I am hitting an error. How can I get the Tin_code out of the xml?
xmlDoc = Server.CreateObject("Msxml2.DOMDocument.6.0")
xmlDoc.async = false
xmlDoc.load(objXMLHTTP.responseText)
if xmlDoc.parseError.errorCode <> 0 then
myErr = xmlDoc.parseError
Response.write("You have error " + myErr.reason)
else
xmlDoc.setProperty "SelectionLanguage", "XPath"
currNode = xmlDoc.selectSingleNode("//ValidateTinNameResponse/ValidateTinNameResult/TINNAME_CODE")
Response.write(currNode.text)
end if
The soap looks like this.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ValidateTinNameResponse xmlns="http://www.TinCheck.com/WebServices/PVSService/">
<ValidateTinNameResult>
<TINNAME_CODE>byte</TINNAME_CODE>
<TINNAME_DETAILS>string</TINNAME_DETAILS>
<DMF_CODE>byte</DMF_CODE>
<DMF_DETAILS>string</DMF_DETAILS>
<DMF_DATA>string</DMF_DATA>
</ValidateTinNameResult>
</ValidateTinNameResponse>
</soap:Body>
</soap:Envelope>
ASKER
Error on line 4 is telling me
Brief Description: Object doesn't support this property or method: 'xmlDoc'
Brief Description: Object doesn't support this property or method: 'xmlDoc'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Set currNode = xmlDoc.getElementsByTagNam