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 getWebServiceRe sultsAfterInit( ) {
// Must be using IE for this to work
if(window.Activ eXObject){
// Create the XML Document object
var bDocument=false ;
var aszDocumentProg IDs=[ "MSXML2.DOMDocu ment.4.0",
"MSXML2.DOMDocu ment.3.0",
"MSXML2.DOMDocu ment",
"MSXML.DOMDocum ent",
"Microsoft.XmlD om"];
for(var i=0;!bDocument && i<aszDocumentPr ogIDs.length; i++) {
try{
objXmlDoc=new ActiveXObject(a szDocumentProgr amIDs[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.XMLH TTP"];
for (var i=0;!bHttp && i<aszHttpProgID s.length; i++){
try{
objHttp= new ActiveXObject(a szHttpProgIDs[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! 2 1916
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*********@ya hoo.com> wrote in message
news:ev******** ******@tk2msftn gp13.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 getWebServiceRe sultsAfterInit( ) {
// Must be using IE for this to work if(window.Activ eXObject){ // Create the XML Document object
var bDocument=false ;
var aszDocumentProg IDs=[ "MSXML2.DOMDocu ment.4.0", "MSXML2.DOMDocu ment.3.0", "MSXML2.DOMDocu ment", "MSXML.DOMDocum ent", "Microsoft.XmlD om"];
for(var i=0;!bDocument && i<aszDocumentPr ogIDs.length; i++) {
try{
objXmlDoc=new ActiveXObject(a szDocumentProgr amIDs[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.XMLH TTP"];
for (var i=0;!bHttp && i<aszHttpProgID s.length; i++){
try{
objHttp= new ActiveXObject(a szHttpProgIDs[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!
you misspelled aszDocumentProg IDs in
objXmlDoc=new ActiveXObject(a szDocumentProgr amIDs[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*********@ya hoo.com> wrote in message
news:ev******** ******@tk2msftn gp13.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 getWebServiceRe sultsAfterInit( ) {
// Must be using IE for this to work if(window.Activ eXObject){ // Create the XML Document object
var bDocument=false ;
var aszDocumentProg IDs=[ "MSXML2.DOMDocu ment.4.0", "MSXML2.DOMDocu ment.3.0", "MSXML2.DOMDocu ment", "MSXML.DOMDocum ent", "Microsoft.XmlD om"];
for(var i=0;!bDocument && i<aszDocumentPr ogIDs.length; i++) {
try{
objXmlDoc=new ActiveXObject(a szDocumentProgr amIDs[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.XMLH TTP"];
for (var i=0;!bHttp && i<aszHttpProgID s.length; i++){
try{
objHttp= new ActiveXObject(a szHttpProgIDs[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! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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, using the same
HTML/JS it always returns no data (xmlhttp.responseText is null).
When I try to get headers using Mozilla or display the http status code
I get some obscure exception in the javascript console that I've given
up on searching for an...
|
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, which is the file I
am programmatically rewriting to elsewhere) gets changed.
I am trying to use AJAX and JSON to do this. I have copied an example of
using HttpRequest Object as the backbone of this from...
|
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).
Is there a way to display the content of xmlhttp.responseText on a new
page??
I tried document.write(xmlhttp.responseText) but this does not display
the XML structure.
|
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 with netscape,I dont know how to pass the xmlhttp
request in Netscape. i got some code like below for netscape for
xmlhttp
var oXML=new XMLHttpRequest();
|
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 the
version of Microsoft's XML parser and that Microsoft.XMLHTTP refers to
the latest installed version.
This makes me wonder why sites like
<http://developer.apple.com/internet/webcontent/xmlhttpreq.htmlopt to
use Msxml2.XMLHTTP, first, and...
| |
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 and send the item number to the xmlHttp and works awesome. Now I need to add an apply button next to it. so they can type in the complete number then hit apply and it does the same function. I cant get it to work with the script I have. The image...
|
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 (window.XMLHttpRequest) {
|
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"
xmlHttp.onreadystatechange=stateChanged
|
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:
var xmlReqs = new Array();
function CXMLHttp(cb,data,xmlHttp)
{
this.cb = cb;
this.data = data;
this.xmlhttp = xmlHttp;
}
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |