468,556 Members | 2,051 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,556 developers. It's quick & easy.

Bug with xmlhttp and xmldoc??

I recently write code to get IP address of my network devices in Call Manager. ANd I got problems with xmlhttp and xmldoc.
what is wrong with these 2 lines below?

xmlhttp.Send();
xmlDoc.loadXML(xmlhttp.responseText);

here is the function getDeviceList
Expand|Select|Wrap|Line Numbers
  1. function getDeviceList(callManager, userID, password, protocol) {
  2.  
  3.   var authstring = text2base64(userID + ":" + password);
  4.   var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
  5.   var xmlDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
  6.  
  7.   xmlDoc.async = false;
  8.  
  9.   Response.write("About to get Devices List\n");
  10.   xmlhttp.Open("GET", protocol + "URL of Call Manager DeviceListX", false);
  11.   xmlhttp.setRequestHeader("Authorization", "Basic " + authstring);
  12.   xmlhttp.setRequestHeader("Connection", "close");
  13.   *xmlhttp.Send();
  14.   *xmlDoc.loadXML(xmlhttp.responseText);
  15.   Application("deviceList") = xmlDoc;
  16. }
  17.  
Jun 11 '07 #1
2 2155
Dököll
2,364 Expert 2GB
I recently write code to get IP address of my network devices in Call Manager. ANd I got problems with xmlhttp and xmldoc.
what is wrong with these 2 lines below?

xmlhttp.Send();
xmlDoc.loadXML(xmlhttp.responseText);

here is the function getDeviceList
Expand|Select|Wrap|Line Numbers
  1. function getDeviceList(callManager, userID, password, protocol) {
  2.  
  3.   var authstring = text2base64(userID + ":" + password);
  4.   var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
  5.   var xmlDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument.3.0");
  6.  
  7.   xmlDoc.async = false;
  8.  
  9.   Response.write("About to get Devices List\n");
  10.   xmlhttp.Open("GET", protocol + "URL of Call Manager DeviceListX", false);
  11.   xmlhttp.setRequestHeader("Authorization", "Basic " + authstring);
  12.   xmlhttp.setRequestHeader("Connection", "close");
  13.   *xmlhttp.Send();
  14.   *xmlDoc.loadXML(xmlhttp.responseText);
  15.   Application("deviceList") = xmlDoc;
  16. }
  17.  
What is is not doing, KingdomHeart?
Jun 11 '07 #2
it said those 2 line are error when I run the program. I think the reasons are because xmlhttp does not perform https/ssl. So is there a way to handle https. Or how can I go to an https link, get the content of the link and parse it. Thank you so much
Jun 13 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by xarrisx | last post: by
9 posts views Thread by balakrishnan.dinesh | last post: by
13 posts views Thread by yawnmoth | last post: by
3 posts views Thread by Andrewh | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.