473,320 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

XMLHTTP


Hello everybody,
I am trying to develop code to use the correct version of XMLHTTP before
using it to send SOAP envelope to WebService . The code I have written
is as follows,

function getWebServiceResultsAfterInit() {

// Must be using IE for this to work
if(window.ActiveXObject){
// Create the XML Document object

var bDocument=false;

var aszDocumentProgIDs=[ "MSXML2.DOMDocument.4.0",
"MSXML2.DOMDocument.3.0",
"MSXML2.DOMDocument",
"MSXML.DOMDocument",
"Microsoft.XmlDom"];

for(var i=0;!bDocument && i<aszDocumentProgIDs.length; i++) {

try{

objXmlDoc=new ActiveXObject(aszDocumentProgramIDs[i]);
bDocument=true;
}catch (objException){

}

} // End of For Loop

// Create the XML HTTP object
var bHttp= false;

var aszHttpProgIDs=["MSXML2.XMLHTTP.4.0",
"MSXML2.XMLHTTP.3.0",
"MSXML2.XMLHTTP",
"Microsoft.XMLHTTP"];
for (var i=0;!bHttp && i<aszHttpProgIDs.length; i++){

try{

objHttp= new ActiveXObject(aszHttpProgIDs[i]);
bHttp=true;
} catch (objException) {

// error handling elided for clarity

}
}// End of For Loop

if(!bDocument ||!bHttp){
throw "MSXML not found on your computer.";

return;

}
However the code is not running and the error I am getting is Exception
thrown but not caught.. I am getting lost.. WOuld really appreciate it
if somebody helps me.

Thanks in advance..

Kapil
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
2 1883
I would guess that is because you are explicitly throwin an exception in
that last 'if' statement, but you are not catching it anywhere.

Also, I wouldn't say this is an ASP.NET question per say, more like
javascript.

"Kapil Shah" <kr*********@yahoo.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...

Hello everybody,
I am trying to develop code to use the correct version of XMLHTTP before
using it to send SOAP envelope to WebService . The code I have written
is as follows,

function getWebServiceResultsAfterInit() {

// Must be using IE for this to work
if(window.ActiveXObject){
// Create the XML Document object

var bDocument=false;

var aszDocumentProgIDs=[ "MSXML2.DOMDocument.4.0",
"MSXML2.DOMDocument.3.0",
"MSXML2.DOMDocument",
"MSXML.DOMDocument",
"Microsoft.XmlDom"];

for(var i=0;!bDocument && i<aszDocumentProgIDs.length; i++) {

try{

objXmlDoc=new ActiveXObject(aszDocumentProgramIDs[i]);
bDocument=true;
}catch (objException){

}

} // End of For Loop

// Create the XML HTTP object
var bHttp= false;

var aszHttpProgIDs=["MSXML2.XMLHTTP.4.0",
"MSXML2.XMLHTTP.3.0",
"MSXML2.XMLHTTP",
"Microsoft.XMLHTTP"];
for (var i=0;!bHttp && i<aszHttpProgIDs.length; i++){

try{

objHttp= new ActiveXObject(aszHttpProgIDs[i]);
bHttp=true;
} catch (objException) {

// error handling elided for clarity

}
}// End of For Loop

if(!bDocument ||!bHttp){
throw "MSXML not found on your computer.";

return;

}
However the code is not running and the error I am getting is Exception
thrown but not caught.. I am getting lost.. WOuld really appreciate it
if somebody helps me.

Thanks in advance..

Kapil
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
you misspelled aszDocumentProgIDs in

objXmlDoc=new ActiveXObject(aszDocumentProgramIDs[i]);

also, when xp-sp2 is installed, this code will require a high security
setting.

note: soap call support is builtin with netscape/mozilla


"Kapil Shah" <kr*********@yahoo.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...

Hello everybody,
I am trying to develop code to use the correct version of XMLHTTP before
using it to send SOAP envelope to WebService . The code I have written
is as follows,

function getWebServiceResultsAfterInit() {

// Must be using IE for this to work
if(window.ActiveXObject){
// Create the XML Document object

var bDocument=false;

var aszDocumentProgIDs=[ "MSXML2.DOMDocument.4.0",
"MSXML2.DOMDocument.3.0",
"MSXML2.DOMDocument",
"MSXML.DOMDocument",
"Microsoft.XmlDom"];

for(var i=0;!bDocument && i<aszDocumentProgIDs.length; i++) {

try{

objXmlDoc=new ActiveXObject(aszDocumentProgramIDs[i]);
bDocument=true;
}catch (objException){

}

} // End of For Loop

// Create the XML HTTP object
var bHttp= false;

var aszHttpProgIDs=["MSXML2.XMLHTTP.4.0",
"MSXML2.XMLHTTP.3.0",
"MSXML2.XMLHTTP",
"Microsoft.XMLHTTP"];
for (var i=0;!bHttp && i<aszHttpProgIDs.length; i++){

try{

objHttp= new ActiveXObject(aszHttpProgIDs[i]);
bHttp=true;
} catch (objException) {

// error handling elided for clarity

}
}// End of For Loop

if(!bDocument ||!bHttp){
throw "MSXML not found on your computer.";

return;

}
However the code is not running and the error I am getting is Exception
thrown but not caught.. I am getting lost.. WOuld really appreciate it
if somebody helps me.

Thanks in advance..

Kapil
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: fochie | last post by:
Greetings, I'm having a problem when I try to GET a file from my server via xmlhttp when using Mozilla. With IE I can get any type of file fine, get/display headers fine, etc. With Mozilla,...
1
by: Ike | last post by:
Ive copied an online example for writing out a php file, programmatically, then would like to re-display that data in a browswer window that automatically refreshes as the data file (getdata.php,...
5
by: hatsumoto | last post by:
Hello, I create an ActiveXObject("Msxml2.XMLHTTP") from my HTML page to submit (i.e. post) XML to a server. I can see the content of the XML response via javascript alert(xmlhttp.responseText)....
9
by: balakrishnan.dinesh | last post by:
hi friends, Exactly what i want to know is, In my product we are using xmlhttp request to retrive some data from the server, And Im using IE browser, its working fine in IE. Now i want to work...
13
by: yawnmoth | last post by:
<http://www.quirksmode.org/book/printable/xmlhttp.txtshows two alternatives to Microsoft.XMLHTTP - Msxml2.XMLHTTP and Msxml3.XMLHTTP. If my understanding is correct, the different numbers refer to...
1
by: wkerplunk | last post by:
Below is what I have build with several different languages. It works great but I need help, I am stuck. When you click on an item in the dropdown autocomplete div it does a mousedown function...
3
by: Andrewh | last post by:
Hi, I am having a bit of a problem with using xmlhttp. The code of the javascript file is shown below used in Windows XP. var xmlhttp = null; function SetURLDiv(url) { if...
2
by: trpost | last post by:
Is it possible to execute javascript as passed in xmlHttp.responseText Here is what I am doing: search.js var xmlHttp xmlHttp=GetXmlHttpObject() var url="search.php"...
1
by: StevenS | last post by:
Ok, I'm very new to AJAX programming, and fairly new to Javascript. (I was originally trained on low-level C programming.) I'm trying to build a simple AJAX routine in a file named ajax.js: ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.