cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Response ERROR **

Hello All,

 

I wrote a simple test script using Classic ASP to get the status of a subscription. It is working however I am getting an error from ( objHTTP.selectSingleNode("/*/api:status").Text ). Can someone please tell me the proper way to make this call. However I know the script is working becuase this ( objHTTP.responseText ) is returning all the subscription details fine. 

 

SCRIPT 

************************************************

 

strXML = strXML & "<?xml version=""1.0"" encoding=""utf-8""?>"

strXML = strXML & "<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/"">"

strXML = strXML & "<soap:Body>"

strXML = strXML & "<ARBGetSubscriptionStatus xmlns=""https://api.authorize.net/soap/v1/"">"

strXML = strXML & "<merchantAuthentication>"

strXML = strXML & "<name>XXXXXXXX</name>"

strXML = strXML & "<transactionKey>XXXXXXXXXX</transactionKey>"strXML = strXML & "</merchantAuthentication>"

strXML = strXML & "<subscriptionId>XXXXXXXXXX</subscriptionId>"strXML = strXML & "</ARBGetSubscriptionStatus>"

strXML = strXML & "</soap:Body>"strXML = strXML & "</soap:Envelope>"

post_url = "https://api.authorize.net/soap/v1/Service.asmx"

 

objHTTP = Server.CreateObject("Microsoft.XMLHTTP")

objHTTP.open "post", post_url, False

objHTTP.setRequestHeader "Content-Type", "text/xml"

 

Set objResponse = Server.CreateObject("MSXML2.DOMDocument.4.0")

objResponse.loadXML objHTTP.responseText

objResponse.setProperty "SelectionNamespaces", "xmlns:api='AnetApi/xml/v1/schema/AnetApiSchema.xsd'"

Response.write objHTTP.responseText ***** THIS WORKS!! *****

 

***** THIS DOESN'T WORK!!! *********************

Response.Write "Subscription Status: " & objHTTP.selectSingleNode("/*/api:status").Text 

 

ERROR RETURNED BY ASP:

 

/test.asp, line 49

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'selectSingleNode'

 

Thanks,

 

Frank G.

Knuckles2002
Contributor
3 REPLIES 3

NOTE: I have also tried this to and it also errors:

 

 

Response.Write "Subscription Status: " & objResponse.selectSingleNode("/*/api:status").Text

 

Thanks again!!

Knuckles2002
Contributor

Can anyone please help me out with this? PRETTY PLEASE :-)

It probably a problem with Microsoft.XMLHTTP.

Seem like other are having better luck with MSXML2.ServerXMLHTTP

http://community.developer.authorize.net/t5/forums/searchpage/tab/message?q=Microsoft.XMLHTTP#messag...