Reply
Highlighted
Contributor
Posts: 13
Registered: ‎07-14-2011

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.

Highlighted
Contributor
Posts: 13
Registered: ‎07-14-2011

Re: SOAP Response ERROR **

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

 

 

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

 

Thanks again!!

Highlighted
Contributor
Posts: 13
Registered: ‎07-14-2011

Re: SOAP Response ERROR **

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

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: SOAP Response ERROR **

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...