[thelist] xmlhttp

Tab Alleman Tab.Alleman at RealMetros.com
Tue Jul 31 14:02:51 CDT 2001


Hey everybody, the Tabster is back.. miss me?   even remember me?

Anyway...new job, new technologies, new problems.  This time I'm diving
into XML and already hit the first (and probably the most obvious) wall.

script1.asp needs to send an http request to xmlgenerator.asp, wait for
the response, and then store the response into a variable so that I can
get the stuff I need and throw away the rest.

Has anybody been able to do this with any success, and if so, using
what?   I'm trying to get Microsoft's xmlhttp object to work and it
simply refuses.

here's the pertinent exerpt from script1.asp:

<!-- 

'Use XML to get Hotel Info!
Dim xmlHotInfo, GetStr
GetStr =
"http://www.travelnow.com/external/xmlinterface.jsp?cid=3464&resType=hot
el&xml=<HotelSessionRequest%20method='selectHotelInfoForHotel'><hotelID>
110113</hotelID></HotelSessionRequest>"

Set xmlHotInfo = CreateObject("Microsoft.XMLHTTP")
xmlHotInfo.open "POST", GetStr, false
xmlHotInfo.setRequestHeader "Content-Type", "text/xml"
xmlHotInfo.send 

Dim HotInfo
HotInfo = xmlHotInfo.responseText
Response.Write("<h3>XML:  " & HotInfo & "</h3>")

-->

The page runs without blowing up, but HotInfo is empty at the end.  Yet
when I actually load the URL into the location window of the browser (or
click on it above for that matter), I get a whole buncha raw XML.

What am I doing wrong?????

TIA,
Tab





More information about the thelist mailing list