.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SP Webservice:Lists.GetListItems

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :SharePoint
i want to get all list items in "test" list Lists.GetListItems("test", null,null,null,null,null,null), but it returns only the first page. about Lists.GetListItems Method http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx, in the "Remarks",  "includes a ListItemCollectionPositionNext attribute inside the rs:Data element", i can find the node but how can i get the next page items? any help?  

View Complete Post

More Related Resource Links

lists.asmx webservice an unexpected error occured


I have a sharepoint site and am using the list.asmx webservice to update rows in a list.  My code was working well.  For some reason, after doing a very large batch of updates, the same code now gives this error each time I run it.  The strange thing is that everything worked, I did a large batch then everything broke.  I switched to another site and it worked again.  I did a large batch and everything once again broke.

<Result ID="1,Update" xmlns="http://schemas.microsoft.com/sharepoint/soap/"><ErrorCode>0x80131904</ErrorCode><ErrorText>The operation failed because an unexpected error occurred. (Result Code: 0x80131904)</ErrorText>

Cannot access Sharepoint List using Lists.asmx webservice

var a = new ActiveXObject("Microsoft.XMLHTTP");
a.setRequestHeader("Content-Type", "text/xml;charset=utf-8");
a.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/sharepoint/soap/GetListItems");

var d = "<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:tns='http://schemas.microsoft.com/sharepoint/soap/'><soap:Body><tns:GetListItems><tns:listName>

Recursive get Lists from Main site and all subsites by using webservice.



How can I recursive get Lists from Main site and all subsites by using webservice.

    Dim websService As New TestWebService.Lists()
    Dim ndLists As XmlNode = websService.GetListCollection()

This way I only can get the current site lists, but not the subsites. Do I have to reference all of the subsite webservcie? Thanks!

Displaying SharePoint lists in Web Parts

When you create a built-in or custom list in Microsoft Windows SharePoint Services, Windows SharePoint Services creates a Web Part, a basic building block of a SharePoint site, to display that list. These Web Parts are called List View Web Parts. Windows SharePoint Services stores List View Web Parts in the site collection Web Part gallery. (The site collection Web Part gallery is the most central gallery of Web Parts for a work group. By default, the gallery name is the name of the site, such as "Our Team Site Web Part Gallery." )

SharePoint Tutorial - Lists

A list is a feature in SharePoint that stores a lists of information. For example, a list can be created to store web links in the human resources team site. A list is usually created for a specific type of information. Lists can contain metadata to describe the particular information in more detail and to make it easier to find.

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

saving XML output from webservice


 I created a webservice that takes casenum as input and gives results as a dataset in an XML.

I could make a web client to display the resulting dataset in a grid view. Pls see my code copied below.

Now I want to create a console client that takes the casenum as input, to call the webservice and saves the resulting xml for further processing, but can't figure out how to just capture the xml to save. Here's the code for my web client. I would appreciate if you could help modify this tocapture the resulting xml to save file locally.

Thank You.

namespace ResultsWebServicesClient
    public partial class _Default : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)

        private void BindDataToGrid(string CaseNum)
            FG_Results results = new FG_Results();
            DataSet ds1 = new DataSet();
            ds1 = results.Get_FG_Results(CaseNum);
            GridView1.AutoGenerateColumns = true;
            GridView1.DataSource = ds1.Tables[0];

        protected void GetResults(object sender, EventArgs e)


HTTP Post and WebService


I am working on a application which will accept the data in the post request. My application also wants to expose a web service and want to call another web service. Considering all these 3 action that I want to do, can I create a single application which will have a web form which will accept the POST request and expose a web service at the same time.

Although it may be possible to achieve this, Is this a correct way of doing it?

Calling webservice from the server


I have a sample web service and aspx file. I deployed them to an existing website that contains classic asp files.

web-service: --- using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; [WebService(Namespace = "http://localhost/MyWebServices/")] public class MembershipRegisWebService : System.Web.Services.WebService { public MembershipRegisWebService () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string HelloWorld() { return "Hello World."; } }

aspx.cs file: --- using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Services; public partial class CallWebService : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { MembershipRegisWebService mrWs = new MembershipRegisWebService(); Response.Write("Calling web service:" + mrWs.HelloWorld()); } }

It runs locally, but it shows an error when running it from the server:

Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the follow

C# / Java webservice


I am writting a client applicatin that acesses a webservice written by another company.  I need to test against this webservice but since it is live I need another place to test with.  I don't have access to the code from the webservice but have added a reference to my project.  I would like to create a test platform using C# which will run on IIS and not Java.

I have created a basic webserive using both the NetBeans platform and the VS/C# platform.  The problem I am having is if I dynamically change the web address from one to the other my client application complains that the webservice is invalid.  I have verified all the calls are the same.

Are there any setting with VS/C# that allow me to configure it to behave more like the Java webservice?  I don't have the server support to host the Java application for full testing along with other problems using the Java version.

I have run both services in the "WCF Test Client" and can see where the WCF service uses the varibles for request and the Java uses body/request but can't get the WCF to follow that format.  I read somewhere about changing the OperationContract with SoapRpcMethod but then the mentod is not longer exposed. I also tried a Web Service in .NET 3.5 instead of a WCF server but that seems to be more trouble and does not

Printing crystal report from webservice



I am trying to print crystal repot directly from a C# application, which is calling webservice. I am able to display report in crystalreportviewer by passing the webservice call to datasource. However, is there anyway, I can print directly without showing the report?

Alternatively, I was trying return ReportDocument object from webservice, which would solve my problem, but I was unable to return the ReportDocument because of serialization issue. Is it even possible? Thank you


Writing Data to database with jQuery Forms, ASMX Webservice, & JSON - help!



Can someone point me in the right direction on how to submit data from a jQuery form to a ASMX webservice? I have gotten everything on the form ready to be submitted to the database and now I am stuck on how to send it over using $.ajax(). Everything I have read tells me how to get data from a webservice and display it with jQuery, but not the other direction nor how to access the json data within the within the webservice service(similar to a Request.Form approach with ASP.NET forms).

In other words: 

1. What do I need to do to my webservice to make sure it can receive data from the jQuery form. 

2. What do I need to do in jQuery to receive an acknowledgement the save on the server side was successful. 

I can explain more if need be, but if there is a comprehensive tutorial on not only reading, but also WRITING data with jQuery, JSON, etc. I would love to get pointed in that direction. 

Webservice using socket layer programming



   I want to access a webservice in asp.net programming. This webservice was done using socket layer programming and also i am having the ipaddress and port address. Did any one know about how to access webservice using socket layer and if know let me know how to access the webservice. Thank you

problem with webservice



I wrote a program that connects to a webservice (with client side script such as jquery) and fetches data from  the webservice.

Now the program is working properly in local system, but when I upload it to host, the script cannot connect to the webservice.

What is the problem?

[newbie] How to return a data record from a webservice (wsdl)?



vs2010, .NET 4.0

I have a webmethod which I want to return a data record (for example: name, surename, address, age, zip etc)

I wonder how to accomplish this. I think the solution is about creating an object which contains all the records serialized. And then the webmethod returns this serialized object. I'm not 100% sure how to accomplish this, if some of you good provide me with some tips, tutorial or link to an article explaining it, that would be great

UpdateListItems Webservice is not working on Photo directory in blogsite



   I have created a site using the standard blogsite template. By default it contains a picture library named "Photos". I want to create a new folder in this library using the UpdateListItems Webservice. But I am getting an exception saying "The file name you specified could not be used.  It may be the name of an existing file or directory, or you may not have permission to access the file." But there is not file/folder with the name I am specifying. I am using the following query to create the folder



  <Batch PreCalc="TRUE" OnError="Continue" RootFolder="/forexp/Photos">

  <Method ID="1" Cmd="New">

  <Field Name="ID">New</Field> 

  <Field Name="FSObjType">1</Field> 

  <Field Name="FileRef">/blogsite/Photos/TestFolder</Field> 




Please note that I can create the folder using the web interface. I also created a new picture library in the same site and used the same above query to create the folder and I am able to create the folder.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend