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

Post New Web Links

Xmlnode to Dataset/DataTable (GetListItems Sharepoint Webservices)

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :SharePoint

How to convert XmlNode to Dataset or Datatable and below is my code..

 DataSet dsList = new DataSet();

            Web_Reference.Lists listService = new Web_Reference.Lists();

            listService.PreAuthenticate = true;
            NetworkCredential Cred = new NetworkCredential();
            Cred.Domain = Domain;
            Cred.UserName = Login;
            Cred.Password = password;

            listService.Credentials = Cred;

            string listName = "{0F775034-47EA-486F-97AE-50C5BD9011B0}";
            string viewName = "{8F441557-E75B-4BAC-A3EF-B61FF0351DBE}"; ;
            XmlDocument xmlDoc = new System.Xml.XmlDocument();

            System.Xml.XmlNode ndQuery = xmlDoc.CreateNode(System.Xml.XmlNodeType.Element, "Query", "");
            System.Xml.XmlNode ndViewFields = xmlDoc.CreateNode(System.Xml.XmlNodeType.Element, "ViewFields", "");
            System.Xml.XmlNode ndQueryOptions = xmlDoc.CreateNode(System.Xml.XmlNodeType.Element, "QueryOp

View Complete Post

More Related Resource Links

convert sharepoint webservices output xmlnode to dataset



Working on moss 2007. I am working on sharepoint usergroup webservices to retreive all usergroups from sharepoint site by using the GetAllUserCollectionFromWeb method which returns the output in xmlnode format. can you please help me how to convert this xmlnode to dataset.

here is the code.

webreferencename.UserGroup usrgrpService = new webreferencename.UserGroup();
           usrgrpService.Credentials =
           XmlNode result = usrgrpService.GetAllUserCollectionFromWeb();

its very urgent please me

Data Points: DataSet and DataTable in ADO.NET 2.0


ADO. NET 2. 0 sports some exciting enhancements to the core classes found in ADO. NET 1. x and introduces a variety of new classes, all of which promise to improve performance, flexibility, and efficiency.

John Papa

MSDN Magazine November 2005

delete a row in datatable using linq to dataset

hihow can i delete a row in datatable using linq to dataset?I have a dataset in my project, need to delete some rows filtered by IDhow can i do?

Webservice returns xml.xmlnode - Need help getting response into dataset

Forgive me I am new to webservices so there may be something obvious that I am overlooking but any help would be appreciated.  Below is my code.  The reportrequest is perfectly formatted, i've already tested that with SoupUI.  The problem is the line I highlighted.  I am getting an error saying outerXml is not a member of System.Array.  Please provide any insight on how to go about this. Dim o As New sushi.SushiService Dim xn As XmlNode() = o.Getreport(reportrequest) Dim dsXML As DataSet = New DataSet() Dim reader As XmlTextReader = New XmlTextReader(xn.outerXml, XmlNodeType.Element, Nothing) dsXML.ReadXml(reader) gvresults.DataSource = dsXML gvresults.DataBind()Thank You!!!

sharepoint webservices add task AssignedTo

Hello everyone, I am currently working on a biztalk project that has to create a task through the sharepoint webservices. Everything works fine except for the AssignedTo part. When I get the response of the getuserinfo() method, I notice that the userid I get is '87'. I then enter this userid in the AssignedTo part and send it to the updateListItems() method and the task gets created, but it is assigned to another person. When I create a task statically (by surfing to sharepoint and click add task..) and I view this task in CAML viewer I see that my userId in assignedTo is '218'. Why does the userinfo() method return an id '87' for my username while it actually is '218'? Is this a active directory problem or something like that? Hope someone can help thx

Crystal Report with DataSet, DataTable (Having Problems)

Hello All,     I am a bit new with Crystal Reporting and I was given the Job to take an exisitng report , modify it and load it on a website... the report part is done but the loading is been a pain. So here is what i did,    protected void Button1_Click(object sender, EventArgs e) { SqlConnection cn = new SqlConnection("server=ss;uid=sss;pwd=ss;database=sss"); cn.Open(); #region quer //Query Here, This is working fine #endregion ReplaceEscape(qry); SqlCommand cmd = new SqlCommand(qry, cn); cmd.CommandTimeout = 1000; cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet myDataSet = new DataSet(); da.Fill(myDataSet, "DSAllStatQuery"); ReportDocument cryRpt = new ReportDocument(); cryRpt.SetDataSource(myDataSet); cryRpt.Load(@"C:\Users\erodriguez\Documents\Visual Studio 2010\WebSites\AllStats\CrystalReport.rpt"); CrystalReportViewer1.ReportSource = cryRpt; cn.Close(); } public static string ReplaceEscape(string str) { str = str.Replace("'", "''"); return str; } I crea

Returning DataSet/Datatable from Webmethod to Javascript

I have a simple web method written in the code-behind (not a separate asmx) of a test aspx page. All it does is return a DataTable(or DataSet) both are failing, gives a blank 500 error saying "There was an error processing the request" If I switch the return variable type to String, it works fine I think my issue has to do with the version of the System.Web.Extensions, is that the assembly that actually contains the JSON communication implementation? I've read all kinds of tutorials about how it should be possible to return the DataTable to javascript and then read the properties with javascript syntax. For some reason it isn't working for me. My web extensions is imported through my web.config with the following version <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

using sharepoint webservices


I have very little knowledge about sharepoint object model and webservices used in sharepoint so i need someone to give a solution to my scenerio We have a farm in which my current site has a library and I want to show that library updates in other farm site, just the library not the entire site has to be updated everytime I make changes to my site farm library and my manager wants me to use webservices ,I have no idea abt this can anyone guide me



Add items to sharepoint custom list using javascript with webservices



Here is the code snippet i was trying to insert item to sharepoint list but i conn't please help me what is wrong in my code and modify it.


function addlistitem(item)


var xmldoc;

var batch;

var FeedbackHTTP;

var ListName = 'Suggestions';

//The batch variable builds up the XML that we are going to submit to the SharePoint list via the SharePoint web service

batch = "<batch><method id='1' cmd='New'><field name='Title'>" + item + "</field></method></batch>";

xmldoc = '<?xml version="1.0" encoding="utf-8"?><soap:envelope xsi="http://www.w3.org/2001/XMLSchema-instance" xsd="http://www.w3.org/2001/XMLSchema" soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:body><updatelistitems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'

xmldoc = xmldoc + '<listname>' + ListName + '</listname>';



xmldoc = xmldoc + '<updates>' + batch + '</updates></updatelistitems></soap:Body></soap:Envelope>';

FeedbackHTTP = new ActiveXObject("MSXML2.XMLHTTP.3.0");


How to return datatable from a typed dataset using WCF service and Jun CTP ?


How to return datatable from a typed dataset using WCF service/



       In one of my application I am using the Typed Dataset that contains many tables. I want to return a particular Datatable form the dataset as following.


Case 1. The following code is working, but the problem is I can not use .EnforceConstraints = false property as this property only available with Dataset.  (I want to use this property because I want to return only selected fields from the table and rest of the fields may have not null columns)

Uploading a Document using Webservices in sharepoint 2010 won't checkin




I'm developping an application with vs2010 for Sharepoint 2010 that uploads documents via the webservice Copy.asmx, everything works fine except that even if i fill the required meta-datas the document in the library in sharepoint GUI appears as checked-out...

Does Any one knows why ??

Here is a part of my code :


       Dim webUrl As String = "http://mywebdev"
        Dim copyService As SPCopy.Copy = New SPCopy.Copy()
        copyService.Url = webUrl + "/_vti_bin/copy.asmx"
        copyService.Credentials = System.Net.CredentialCache.DefaultCredentials

        'Declare and initiates the Copy WebService members for uploading
        Dim sourceUrl As String = "C:\\Documentation\\using.pdf"
        Dim destinationUrl As String() = {"http://mywebdev/Docs/using.pdf"}
        Dim cResult1 As SPCopy.CopyResult = New SPCopy.CopyResult
        Dim cResult2 As SPCopy.CopyResult = New SPCopy.CopyResult

Webservices that are not exposed in current sharepoint online


Hi ,

From the SharePoint Online Standard Developer's guide Dec 2008, It is not clear if the if search related webservices are fully exposed or not!

According to document, Sharepoint online supports /_vti_bin/spsearch.aspx but it does not support /_vti_bin/search.aspx-->(Allows access to Enterprise Search results from client applications and Web applications outside of the context of a SharePoint Online site )

I am not able to understand the difference. Does Sharepoint Online support searching for documents using the Query and QueryEx methods exxposed in the Search Webservice ?

And Another Question , If I have to deploy some custom webservices in current model of sharepoint online, then Azuri is the only way to go ?





Adding rows to a databound DataSet/DataTable from a ThreadPool thread does not update UI


I have an WPF .NET 4.0 application which creates a TreeView in the main thread, and databinds it to a DataSet which contains two DataTables. The datatables have a simple relationship between them which represents a two-level tree. When the treeview is initially drawn, it correctly displays all items from the two datatables as a two level tree.

When the DataTables are updated from the UI thread (add/delete/modify a row), the treeview is refreshed and the changes to the databound DataSet DataTables are visible in the treeview.

If changes to the DataTables are made from a ThreadPool thread, no exceptions are thrown, but the UI is not updated. I am using a threadpool thread because the changes will be initiated from multiple network devices and processing their data is fairly CPU intensive.

I am assuming that change notifications are not being propogated across threads for DataSets/DataTables.  Is this assumption correct? If so, are their recommended best practices to overcome this limitation?

Import multiple xml files(sharepoint webservices out put) to sql database using ssis



I am importing xml file in to sql server database i was able to do this task for single xml file in to sql database using ssis( i am using dataflow task, xml source, data conversion, oledb destination creating a ssis package).

Now i am having 3 xml files, need to store in different tables in sql server database can someone explain how i can import multiple xml files in to different tables in sql.can we create a xsd for each xml file while importing.

System.Security.SecurityException while accessing Sharepoint Webservices


Hi ,

We are consuming WSS3.0 webservices in our web application which is deployed in the same Sharepoint - 80 Front end web server.

--Sharepoint - 80 --> TestWebApp (using same shrepoint application pool, which uses farm administrator credentials)

-- IIS7 settings, Windows authentication and Asp.Net impersonation enabled for both sharepoint-80 and TestWebApp

When we try to access _vti_bin/Lists.asmx webservice from TestWebApp, we are getting the following message:

[SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.CodeAccessPermission.Demand() +54
   System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint) +204
   System.Net.HttpRequestCreator.Create(Uri Uri) +38
   System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase) +256
   System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri) +43
   System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri) +20

VS2010 Prof restart after new dataset and then dragging datatable


Dear all,

I am using VS2010 Prof on Windows XP SP3 on MySQL.

When I new item (DataSet), drag the DataTable.Then wizard prompt up for choosing connection and sql query. When I paste below SQL and then click OK, it restart. Do you know Why??? Anything that I am wrong???


FROM retail_transaction RT INNER JOIN trans_item_line TIL
WHERE RT.type_id <> 2
 AND ((RT.Start_DateTime >= ? AND RT.Start_DateTime <=?) OR 1=?)

How to filter XML recored with out using datatable or dataset.


hi there,

               i want filter data with out using Dataset or datatable, any one help me.



thanks to ypu

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