.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

Reading XML got from consuming the Sharepoint List Web Service

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :C#

Hi Experts,

I consumed a sharepoint web service, to query a List based in external server. (As explained in various Blogs)

This was easy and I was able to get the XML as result.

Now the problem is,  I want it in more readable format - as I have to bind into a DataGrid. Is it possible to render XML into DataSet or DataTable ?

My code is attached:

Dim wsListsItems As New mdart.Lists() 
'wsListsItems.Credentials = System.Net.CredentialCache.DefaultCredentials Dim credentials As NetworkCredential = New NetworkCredential("", "", "") wsListsItems.Credentials = credentials 'Instantiate an XmlDocument object. Dim xmlDoc As New System.Xml.XmlDocument() Dim listName As String = &q

View Complete Post

More Related Resource Links

Update SharePoint List item using UpdateListItem web service with javascript

I'm using the Custom_AddListMenuItems function in a CEWP to add a menu item to each list item to Archive that item. This is achieved by updating a choice field in the item to 'Archived'. I'm trying to do this using the web service UpdateListItem web service to update the item using Javascript, but I can not find the correct code that updates the list item. I'm using this code:     var ctx=currentCtx;     var ciid=currentItemID;     var xmlHttp=null;     if (confirm("Are you sure you want to Archive this item?"))     {         var soapRequest = '<?xml version="1.0" encoding="utf-8"?>'+             '<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>'+             '        <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+         

How to use SharePoint 2007 list data in Reporting Service (Visual Studio) 2008?

Jeez - I have been googling left and right, and tried all the suggestions. No luck in getting it to work. I am using Reporting Service 2008 tools in my VS2008, trying to create a simple report using SharePoint 2007 data (from a simple list). Here is what I've been doing: Created a simple SharePoint list in a test site - only one column (Title) with one record of data. Started Visual Studio 2008 and created a new Report Server Project Wizard project. I named the data source "dsTest". Type: "XML". As connection string I used: http://site/subsite/subsite/_vti_bin/lists.asmx. Credentials: "Use Windows Authentication (Integrated Security)". Clicked Next and arrived at the "Design the Query" form. I entered this in the Query string box: <Query> <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems" /> <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction> </Query> Clicking Next I get this error: An error occurred while the query design method was being saved. Failed to execute web request for the specified URL. Soap Fault: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown. Now if I view the Details when trying it inside the Query Builder I get this: <errorstring xmlns="http://schemas.mi

SharePoint 2007 - Survey list - Getting user's Windows account ID from a web service using display

Surveys...grrrr.   I am developing a .NET console application that accesses survey data from a single survey list using the MOSS web service "Lists".   I am able to enumerate the survey list and get to the items except for the author of the survey response.  When I get to the column ows_Author, it appears to be a lookup value formatted like this:  "1066;#JOHN DOE".   How can I, using web services alone, lookup the corresponding Windows login ID of that user?  If I go to the survey in SharePoint and click on the name in the view, it takes me to a site-based user profile page that does show the account ID I want.  The page that displays appears to be a virtualized page like this "_layouts/userdisp.aspx?ID=1066".   What I really need is JOHN DOE's account ID like "domain\id". Can I get to this with the data I have available? Thanks

the list cannot be imported because a windows sharepoint service-compatible spreadsheet application

I have googled this for 3 days now, without any solution. I have install, reinstall services and ms office, save as web the excel file for import, without any results, have anyone encounter this error. I need help.

Update custom list of sharepoint using web service

I need update an colunm of list sharepoint using web services. The code used is: private void button1_Click(object sender, EventArgs e)         {             try             {                   WSLists.Lists listService = new Lists();                 listService.Credentials = new System.Net.NetworkCredential("Usuario1", "Password", "Dominio");                 System.Xml.XmlDocument doc = new System.Xml.XmlDocument();                 System.Xml.XmlNode ndListView = listService.GetListAndView("LIST_Test ", "");                 string strListID = ndListView.ChildNodes[0].Attributes["Name"].Value;                 string strViewID = ndListView.ChildNodes[1].Attributes["Name"].Value;         

Item Not inserted into sharepoint list via web service.

Hi all, I am developing a silverlight application. In that application I want to insert data into sharepoint list using Lists.asmx web service. I am retrieving data from grid view and storing data into sharepoint list using method  UpdateListItemsAsync(). But some time all the data from all the eight grid view rows get inserted properly, whereas some time only for rows get inserted, sometime only three. I am not understadding this asynchronous behaviour. Can anyone explain what I have to do to insert all eight rows every time. Thanks,   -Kaustubh

Item update in the sharepoint list using web service with javascript



I am using below code for web services with javascript


function CreateListItem(Title)



    var soap1 = createEnvelope(Title);


    var ws = new ActiveXObject("Microsoft.XMLHTTP");    

      if(ws == null) 

       return null;





    ws.setRequestHeader("Content-Type", "text/xml; charset=utf-8");            







  function createEnvelope(Title)


     var batch;

var xmldoc;    

var ListName = 'S

consuming external web service in custom list over https


I have a custom list that pulls data in from an external third party webservice.  It works fine on our development server but won't update on our production SharePoint server.  I get no errors through the UI, it looks likes it's working, but no data comes through.  I don't know where to start on troubleshooting this.  The production server uses https.  We are on MOSS 2007.  Thanks for any suggestions.

 Edit  -- after doing some research I wonder if this is a trust issue about "accept Server Certificates on a normal WebService proxy method call." 

How would I confirm that this is the issue?




There are no mistakes; every result tells you something of value about what your are trying to accomplish.

Consuming SharePoint 2010 Web Analytics Service in a Custom Web Part



I am writing a custom webpart to show up the Top Queries. As per my understanding we would need to use the Web Analytics WCF Service/Proxy in our custom Web Part code and try and access the method that returns the Top Queries.

Please let me know the name of the Web Analytics WCF Service/Proxy to be used and the if you can get me the method. I have been trying to search for the name of the Web Analytics Web Service/Proxy, but in vain. Looks document is at scarse.

Appreciate your help here.




Update a Sharepoint List in SSIS (Web Service)?


Good day,

I'm trying to update a Sharepoint List withh SSIS (Web Service)?
I tried using Web Services with vbscript/javascript but struggled for days.

I'm working on a Remote sever diff to the Sharepoint & SQL server (3 diff serv)

But thought if i could get a package to update the list (Sharepoint document library) and then execute the package using vbscipt/javascript through a command prompt.

Firstly i would like to get the package to work before i try & execute the package remotely.

Where can i also find the ssis sharepoint list adapters installer package to install.

Please Assist!

reading a text file and put in sharepoint 2010 list



i need help on how will i read records from a text file and put it in sharepoint list? can anyone give a sample program where i can pattern it?

thank you.


Ready made List Types provided by SharePoint

SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

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

Web Service for uploading documents into SharePoint

WS UploadService is a web service written for Microsoft Office SharePoint Server 2007 and Windows SharePoint Services 3.0 and is meant for uploading documents into SharePoint. I have just uploaded the zip file to GotDotNet.com so it will take some time before the zip file appears in the list of downloads. For the time being, you can download the zip file from the following location

problem in consuming WCF service through Window application


I have a silverlight application and WCF service all made in VS 2010 , i had hosted my site to web server which contain Window 2008 and IIS 7.0

now the problem is i have another application which is a window application developed in VS2008 , when i try to add the service reference it gives me error


The document at the url was not recognized as a known document type.

The error message from each known type may help you fix the problem:

- Report from 'DISCO Document' is 'There was an error downloading 'http://dev_qa.emspa.com/HRDev3/Service.svc?disco'.'.

  - The request failed with HTTP status 400: Bad Request.

- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from '' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

Metadata contains a reference that cannot be resolved: ''.

Content Type application/soap+xml; charset

Service Station: Creating And Consuming Web Feeds


Jon Flanders demonstrates creating and consuming Web feeds with Windows Communication Foundation and AtomPub.

Jon Flanders

MSDN Magazine April 2009

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