I have a windows application where i added a web service to sharepoint Lists.asmx.

When i am using the GetListItemChangesSinceToken() method i get an error:

The request failed with the error message:
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="http://localhost:333/Test/Forms/AllItems.aspx">here</a></body>

I am calling the method like this:

public XmlNode GetListItems()
 XmlNode getFirstToken = null;
  getFirstToken = listService.GetListItemChangesSinceToken(
                           listName, null, null, null, null, null, currentToken, null);

where listName equal the guid of the list, and the list name is "Test".

Any one have an idea what that error means? How to solve it?

Thanks alot.

  • Could you please tell me where we can change listService URL? Thanks, Hanumant – user13331 Nov 30 '12 at 11:16
  • You can use the listService.Url property. – user3470 Nov 30 '12 at 11:42
  • Hi Hanumant, welcome to SharePoint StackExchange, so you know that the area you posted your question is an answers area. StackExchange is a questions and answer site, and each thread is for a single question only. You where lucky to have received an answer in here. Please in the future click the "Ask Question" button top right of this page and read through the FAQ[1] for posting guidelines. [1]: sharepoint.stackexchange.com/faq – Hugh Wood Nov 30 '12 at 14:04
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. – Hugh Wood Nov 30 '12 at 14:12
  • Moved the thread to comments on the original question – SPDoctor Nov 30 '12 at 15:31

It appears that listService URL was wrong. I fixed it and it worked.

|improve this answer|||||

Remove the line of code where a URL is being set to the web service object. The URL is not required to be set to a specified server and site since it is already derived from the web service.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy