Problem in convert xml file (created using webservice) to datagridview(

 i had created webservice with two functions 1 is hello which displays the text "Welcome" and 2 is GetNavisionItems which displays the database table in xml format. and publish that web site.

Now i created another windows application project in by click a button i am invoking the webservice which i published.

i can able to print the text "Welcome"

but, i could not able to store the database table in xml format to DataGridView.

now what i have to do pls suggest.

below is my coding:

Imports TestSample24_01_08.TestWS
Imports System.Data
Public Class Form1
    Private Sub btnclick_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclick.Click
            Dim objws As New TestWS.Service
            txt1.Text = objws.Hello
            Dim myODs As New DataSet
            myODs = objws.GetNavisionItems()
            DGView.DataSource = objws
        Catch ex As Exception
        End Try
    End Sub
End Class

 Also, one more thing in the net i found,

myODs = objws.GetNavisionItems() text were replace with myODs = objws.filldataset(). But, if do that na its saying that 'filldataset' is not a member of objws

thanx in advance.

1/24/2008 7:54:56 AM 7071 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 13

try to read the xml in this way



Please mark the answer if it helped you
1/24/2008 9:20:59 AM

if i use that,

at the time of compilation its saying error.

can u explain or  just some thing clearly.

because this my first coding exp. in web service.

thanx man 

1/24/2008 9:58:11 AM

Hi suriya_wnm,

vik20000in is right.

>> myODs.ReadXml(objws.GetNavisionItems())

DataSet class include ReadXml method, which can read data from xml string to store into dataset object, then you can bind the dataset to gridview control.

For more information:

Because you return data via xml , I think the easiest  way is to use datatable to get the data and return.

Like the code:

Server side code:

DataSet GetPerson()


DataTable dt = new DataTable();

//retrieve data to fill dt datatable

return dt;


Client side code:private void Form1_Load(object sender, EventArgs e)


localhost.Service myService = new localhost.Service();

DataTable dt = myService.GetPerson();this.dataGridView1.DataSource = dt;


Best regards,
Guang-Ming Bian - MSFT

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
1/29/2008 7:24:16 AM

Similar Artilces:

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: Hope this helps....

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

serialize a XML file to a VB.NET file (class) using xsd
Hello   I would like to serialize  a XML file to a VB.NET  file (class).   How can I use XSD.exe  to generate my xml file  C:\leye_g\Travaux\Fichiers de données\test.xml  to a VB.NET File ?   Best regardsf Hi XML Schema Definition Tool (Xsd.exe)  can generate runtime classes from  XSD files . XmlElementAttribute Is Missing for the Generated Class Members While Using Xsd.exe describes how to generate class from xml and reports a problem. And you could find more info here: Code Generation in the .NET Framework Using XML Sch...

Problems writing to an XML file
I'm brand new to using XML (in fact this is my first project), so bear with me, I may need a little hand-holding. I'm trying to create a page which simply adds data to an existing xml file. Ultimately it will add the data from a form, but to keep things simple, I've been simply using pre-defined values. Originally I was able to get the script to write the xml exactly as I needed, however it would simply overwrite the existing file every time it was accessed. This is unacceptable, as it will be used to add data to one file, sort of like a mini database. So after much pain and gnashi...

REVIEW: Real World XML Web Services for VB and VB.NET Developers
Real World XML Web Services: For VB and VB .NET Developers by Yasser Shohoud Addison-Wesley Pub Co Web Services. I can't believe there is anyone left alive in the technology sector that hasn't heard these two words. Everywhere you look there are articles, books, and web sites that talk about this technology. Do a book search for "Web Services" on and you will be quite amazed how many Web Services books there are. With so many available picking one buy may seem overwhelming. The good news is it just got a little easier to do. Real World ...

.Net 2.0 Web application using is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one web application using which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

Xml file mapper using Web Service
Hi all, I am tasked with creating a web service that maps a number of files to a relational database.  I have a good idea of how I might do this but need to make sure that a list of files get mapped to the database or else they are all rolled back.  Here is the scenario of what should happen. 1. Call an initializing method with the list of files to process as a parameter 2. This method would return a unique identifier to the caller 3. Everytime the caller calls a mapping function also pass the identifier as a parameter 4. If a mapping function fails call a rollback function wit... web service and xml problem
Hi all ,Im using ,net framework 2.0This is the web service I wrote by request of AS developer (Action script) but when he consume the service  he got the result like this .. <soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="">   <soap:Body>     <GetTransportDetailsResponse xmlns="">       <GetTransportDetailsResult>&lt;TransportMethods&a...

Search in xml files using
I have got a xml file with the nodes "<lang>", "<version>" and "<path>". I know the lang and version. So using this language and version i have to retrieve the path from the xml file. This has to be done using It's like this: <lang>en</lang> <path>D:\DocWriter\Documents\109\109.1_en.xml</path>  <version>8.0</version> I know the lang and version. I have to perform a search for the given lang and version. So please help me in this regard. -Linsen HI,  use XPath to query the xml document, either SelectNodes (for m...

Microsoft Chart control for .NET Framework about state management and serialization problem, it works OK with one XML file but fails with another XML file
I use Microsoft Chart control for .NET Framework , you can see details at The Chart1 is load data from a xml and save to ViewStateData, so even if after I click Reload button, the chart1 still display OK! I'm very strange that the chart1 works well after click Reload button if it's loaded from Chart1.Serializer.Load(HttpContext.Current.Server.MapPath("~/Template/1.xml"));but chart1 don't display fter click Reload button if it's loaded from Chart1.Serializer.Loa...

how to create web service that create xml files availible for web application
Hi epxerts im new in web service. I have a web link which contains nothing when you visit that web link. But when you view the source it will show the xml source in it. I want to create that xml file through web service and make these xml files availible for my application. Best RegardsShaukat Waqar...

Re: Using XML Web Service in VS.NET
Dear all, I added a "test.asmx" file in my current project and I coded all Web Method in the test.asmx.cs in VS.NET. Now I want to ask how can I call the web methods in other C# Class? Suppose the class name of the asmx is "test". How can I instantiate the object of that class? Regards, Joe someone can correct me on this.... i hav done a walkthrough using XML webservice. I have created a windows application that can call methods from the webservice, with the use of a dataset in the webservice. after "adding a web reference" to my windows appli...

Convert delimited file to XML document (VB.Net)
In the application I'm currently working on I had the need to parse a delimited text file and create an XML document out of it. It took some time with the XML and StreamReader Namespaces but I finally wrote what I needed (took so much time simply because I haven't done much work with XML to date)I created a seperate class file for the converting, in the class file you need the following Imports:Imports SystemImports System.IOImports System.CollectionsImports System.DataImports System.Text  The procedure that actually parses the delimited file you pass 5 required items and 1 opti...

appending to existing xml file using
hiedoes anyone know how to append a record to an XML file that already exists using or c#.If i have an xml file like<order date="20/6/2006"><orderID>123</orderID><CustomerID>23</CustomerID><TotalCost>£1200</Totalcost></order>and i want to add another record below this one programmatically.Thanks   Hi, if you se XmlDocument, look for XmlNode.Clone or XmlNode.CloneNode. With these you can make a copy of the node's structure, then you just need to set the values of respective elements and save the XmlDocument.Tha...

Web resources about - Problem in convert xml file (created using webservice) to datagridview( -

Newest 'entity-framework' Questions - Stack Overflow
Q&A for professional and enthusiast programmers

Mono 2.0 released, brings C# 3.0 to Linux and Mac OS X
The Mono project, which develops an open-source and cross-platform …

CodePlex - Project Directory
Project hosting for open source software.

Quick Answers - CodeProject
Questions - Free source code and tutorials for Software developers and Architects.; Updated: 11 Jul 2012

C# Corner - Developers and IT Professionals Community
Community for Developers and IT Professionals

Synchronize Now!
Eric uses's S3 web service and .NET 2.0's FtpWebRequest class to securely synchronize files on multiple machines.

Gabriel Mongeon
Archive - Gabriel Mongeon

Debugging Tool: Build a Logging and Event Viewing Library to Help Debug Your .NET Framework-based App ...
Sign in MSDN subscriptions Get tools ...

Utilities - Software Downloads - PCWorld
Utilities downloads software and reviews .NET DataGridView Columns assembly for .NET 2.0, 3.0, 3.

Tutorials - Switch on the Code
Username: Password: Register - Forgot Password Home Tutorials Forums News & Other Posts Podcast About Us Contact Us Tutorials .NET C# Snippet ...

Resources last updated: 1/18/2016 12:17:15 PM