2

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 :)

0

1 Answer 1

1

Here is a nice walk through: http://weblogs.asp.net/jan/archive/2009/04/09/calling-the-sharepoint-web-services-with-jquery.aspx

I'd also recommend that you also take a look at a tool like Fiddler that can watch the traffic between your browser and the server. This can be a great help in figuring out all sorts of problems that might crop up while you are developing.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.