0

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;
 try
 {
  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.

5
  • Could you please tell me where we can change listService URL? Thanks, Hanumant Commented Nov 30, 2012 at 11:16
  • You can use the listService.Url property. Commented Nov 30, 2012 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 Commented Nov 30, 2012 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. Commented Nov 30, 2012 at 14:12
  • Moved the thread to comments on the original question Commented Nov 30, 2012 at 15:31

2 Answers 2

0

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

0

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.

Your Answer

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