Hi, I am trying to access webservice and fetch information through its webmethod through Javascript. But this is unable to send XML to webservice url in FireFox browser.
Though this is working fine in IE.
Can you please suggest the solution of this issue as this generates exception as below:
uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_A VAILABLE) [nsIXMLHttpReque st.status]" nsresult: "0x80040111 (NS_ERROR_NOT_A VAILABLE)" location: "JS frame :: http://localhost:57157/Users/gkuma3/Desktop/BindList-II.html :: anonymous :: line 52" data: no]
Thanks in advance!
Regards,
Gurudatt
Though this is working fine in IE.
Code:
<script type="text/javascript">
var XMLcode = "";
function loadXMLData()
{
if (window.XMLHttpRequest) {
a = new XMLHttpRequest();
}
else {
var a = new ActiveXObject("Microsoft.XMLHTTP");
}
a.open("POST", "http://10.10.22.133:5680/PPService.asmx", false);
a.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
a.setRequestHeader("SOAPAction", "http://www.xyz.com/GetMessage");
var d = '<?xml version="1.0" encoding="utf-8"?>' +
+'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">'
+ '<soap:Body>'
+ '<GetMessage xmlns="http://www.xyz.com/" />'
+ '</soap:Body>'
+ '</soap:Envelope>';
alert("XML created");
a.onreadystatechange = handleSendUpdateReponse;
if (a.readyState == 4) { // readyState, see below
alert("Ready1");
container.innerHTML = request.responseText;
}
if (a.status == 200) {
alert(a.responseText);
}
a.send(d);
XMLcode = a.responseText;
alert(XMLcode);
}
uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_A VAILABLE) [nsIXMLHttpReque st.status]" nsresult: "0x80040111 (NS_ERROR_NOT_A VAILABLE)" location: "JS frame :: http://localhost:57157/Users/gkuma3/Desktop/BindList-II.html :: anonymous :: line 52" data: no]
Thanks in advance!
Regards,
Gurudatt
Comment