Trying to call sharepoint web service using javascript . it's throwing error not able to call sharepoint service . if i call local XML then working fine . I tried below code for calling sharepoint webservice
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
alert(xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"));
}
xmlhttp.open("GET","http://#######_n/listdata.svc",true,"#####","#####");
xmlhttp.setRequestHeader( 'Content-Type','application/json');
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
I am passing username and password for Authenticate URL . but not able to get data .
So could you tell me some idea for my problem , how can i access sharepoint webservice . which method is correct for getting all details from .svc . Its very important for me now
Advance thanks :)