XMLHTTP-pls help

Discussion in 'ASP .Net Web Services' started by Kapil Shah, Aug 9, 2004.

  1. Kapil Shah

    Kapil Shah Guest

    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);
    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);
    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!
    Kapil Shah, Aug 9, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kapil Shah

    XMLHTTP-Pls help

    Kapil Shah, Aug 9, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    599
    Alvin Bruney [MVP]
    Aug 9, 2004
  2. James Bond
    Replies:
    0
    Views:
    514
    James Bond
    Aug 3, 2004
  3. Rahul S.
    Replies:
    3
    Views:
    595
    Flash Gordon
    Nov 1, 2004
  4. Replies:
    1
    Views:
    273
    RedGrittyBrick
    Jan 2, 2008
  5. yawnmoth

    Msxml*.XMLHTTP vs. Microsoft.XMLHTTP

    yawnmoth, Nov 7, 2006, in forum: Javascript
    Replies:
    11
    Views:
    371
    Matt Kruse
    Nov 9, 2006
Loading...

Share This Page