I used the following code to access the sharepoint from javascript
var soapDataString = "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> \
<soap:Body> \
<Login xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<username>testUser</username> \
<password>testPwd</password> \
</Login> \
</soap:Body> \
</soap:Envelope>"
// Call web service
$.ajax({
url: "http://abc-xyz-sp06/YY-SHAREPOINT/_vti_bin/Authentication.asmx",
type: "POST",
dataType: "xml",
data: soapDataString,
success: resultsFeedback,
contentType: "text/xml; charset=\"utf-8\""
});
function resultsFeedback(xData, status) {
alert(xData);
alert(status);
}
I followed from this article. I even put the above code in the ready function. But the function not entering into resultsFeedback and nothing happens. I am not able to sign-in from the javascript.
error:function (jqXHR, textStatus, errorThrown){ console.log(errorThrown+'error login:' + jqXHR.responseText); }Add this snippet to your code after success. You will find what actually the error is.