473,396 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Getting web service dataset into xml

Hi

I need to access to a web service method that returns a dataset type. Is
there a way to store this remote dataset as an xml file locally, using
vb.net, so I can open a local dataset on the xml? A code example would be
appreciated.

Thanks

Regards
Nov 20 '05 #1
11 1357
Once the data is in the dataset, you can use its WriteXML and ReadXML
methods to persist the data locally.

HTH

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:ez**************@TK2MSFTNGP12.phx.gbl...
Hi

I need to access to a web service method that returns a dataset type. Is
there a way to store this remote dataset as an xml file locally, using
vb.net, so I can open a local dataset on the xml? A code example would be
appreciated.

Thanks

Regards

Nov 20 '05 #2
Hi

Thanks for this. A code example would be great. If there is another way to
get a remote dataset into a local table than that would be even better.

Thanks

Regards
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Once the data is in the dataset, you can use its WriteXML and ReadXML
methods to persist the data locally.

HTH

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:ez**************@TK2MSFTNGP12.phx.gbl...
Hi

I need to access to a web service method that returns a dataset type. Is
there a way to store this remote dataset as an xml file locally, using
vb.net, so I can open a local dataset on the xml? A code example would be appreciated.

Thanks

Regards


Nov 20 '05 #3
Hi John,

Again, I have given you a sample that should be completly working however
you are ignoring it, again, may I know why?

Cor
Nov 20 '05 #4
See sample code in this article:
http://msdn.microsoft.com/library/de...texmltopic.asp
--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
"John" <jo**@nospam.infovis.co.uk> wrote in message
news:ez**************@TK2MSFTNGP12.phx.gbl...
Hi

I need to access to a web service method that returns a dataset type. Is
there a way to store this remote dataset as an xml file locally, using
vb.net, so I can open a local dataset on the xml? A code example would be
appreciated.

Thanks

Regards

Nov 20 '05 #5
Hi Greg,

Where is the Webservice in this sample?

All regulars in this newsgroup know the XMLwrite and XMLread without
thinking.

When you drop a link, than a good one please not so very much basic.

Cor
Nov 20 '05 #6
You addressed your email to Greg but it is a reply to my post. I am Mike.

The link contains the code that answers the posters requirement "to store
this remote dataset as an xml file locally"

The code in the article is:

Private Sub WriteXmlToFile(thisDataSet As DataSet)
If thisDataSet Is Nothing Then
Return
End If
' Create a file name to write to.
Dim filename As String = "myXmlDoc.xml"
' Create the FileStream to write with.
Dim myFileStream As New System.IO.FileStream _
(filename, System.IO.FileMode.Create)
' Create an XmlTextWriter with the fileStream.
Dim myXmlWriter As New System.Xml.XmlTextWriter _
(myFileStream, System.Text.Encoding.Unicode)
' Write to the file with the WriteXml method.
thisDataSet.WriteXml(myXmlWriter)
myXmlWriter.Close()
End Sub
Cor, I don't know who the regulars but my post provided the user a way to do
what was requested and so I posted it. I don't understand why you are making
a request for me to not post basic information when it appears that is what
a poster has requested. What I posted may not be what the poster requested
but that is always a potential outcome of any help given.

Is this newsgroup for advanced users only?

Are there some Microsoft rules about this newsgroup I need to know?

Thanks,

--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com


"Cor Ligthert" <no**********@planet.nl> wrote in message
news:eF**************@tk2msftngp13.phx.gbl...
Hi Greg,

Where is the Webservice in this sample?

All regulars in this newsgroup know the XMLwrite and XMLread without
thinking.

When you drop a link, than a good one please not so very much basic.

Cor

Nov 20 '05 #7
Hi Mike,

I see now that the post of John can be confusing. He had asked before this
in this newsgroup.
How can I make my vb.net app to run as service? This app reads a dataset
from a web service method and saves it in a local access table.
Knowing this than your answer is in my opinion not of much sense, however
reading the way he stated the question in this thread I can imaging why you
posted your link and it is posible he changed his mind.

So sorry for my mistake.

Cor
You addressed your email to Greg but it is a reply to my post. I am Mike.

The link contains the code that answers the posters requirement "to store
this remote dataset as an xml file locally"

The code in the article is:

Private Sub WriteXmlToFile(thisDataSet As DataSet)
If thisDataSet Is Nothing Then
Return
End If
' Create a file name to write to.
Dim filename As String = "myXmlDoc.xml"
' Create the FileStream to write with.
Dim myFileStream As New System.IO.FileStream _
(filename, System.IO.FileMode.Create)
' Create an XmlTextWriter with the fileStream.
Dim myXmlWriter As New System.Xml.XmlTextWriter _
(myFileStream, System.Text.Encoding.Unicode)
' Write to the file with the WriteXml method.
thisDataSet.WriteXml(myXmlWriter)
myXmlWriter.Close()
End Sub
Cor, I don't know who the regulars but my post provided the user a way to do what was requested and so I posted it. I don't understand why you are making a request for me to not post basic information when it appears that is what a poster has requested. What I posted may not be what the poster requested
but that is always a potential outcome of any help given.

Is this newsgroup for advanced users only?

Are there some Microsoft rules about this newsgroup I need to know?

Thanks,

--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com


"Cor Ligthert" <no**********@planet.nl> wrote in message
news:eF**************@tk2msftngp13.phx.gbl...
Hi Greg,

Where is the Webservice in this sample?

All regulars in this newsgroup know the XMLwrite and XMLread without
thinking.

When you drop a link, than a good one please not so very much basic.

Cor


Nov 20 '05 #8
Hi Mike,

Now I see why I sand the message, look at the answer from OHM in this thread
and the reaction from John on this, which all are far before your message.

Cor
Nov 20 '05 #9

"Mike McIntyre [MVP]" <mi****@dotnetshowandtell.com>
Are there some Microsoft rules about this newsgroup I need to know?


I thougth more on respect on other senders not on Microsoft rules, I think
that that is the behaviour of Microsoft as well.

However when you say that are not Microsoft rules I have to believe you.

Cor
Nov 20 '05 #10
Cor,

Great! We are sync'd. The OHM suggested the solution, John requested code,
I provided it.

Thanks for clarifying.

Mike
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Mike,

Now I see why I sand the message, look at the answer from OHM in this thread and the reaction from John on this, which all are far before your message.

Cor

Nov 20 '05 #11
I see,

Great! We are sync'd. The OHM suggested the solution, John requested code, I provided it.


And with that ignoring my answer to John

The code you provided is by the way very confusing, a simple
ds.writeXML(path) does the trick as well.

Cor
Nov 20 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: HardBap | last post by:
I've created a strongly typed DataSet (Customers.xsd) using the xsd.exe tool. I want to be able to access fields using ds.Customer.CompanyName. The problem is when I return this DataSet from a...
0
by: james | last post by:
I have created a web service that returns a very large dataset. The performance of the web service is fine. The web service generates the dataset in about 3 seconds. However when I call the...
2
by: Bob | last post by:
Hi, Can anyone tell me how to resolve this: I am calling a web service from a WinForm app and passing a typed dataset as a parameter. I have added the dataset to the web service project but I...
3
by: Steve Amey | last post by:
Hi all Is it possible to retrieve data from a Windows Service? Let's say I have a service that contains code in the OnStart method that creates a DataSet, from a client application I'm using a...
4
by: R.A. | last post by:
Hi, I have an web service method that accept an xml document and returns a different xml document. Based on the input xml I fill a dataset with information from a database. If the dataset has...
4
by: WinDev | last post by:
We are trying to build a system where we have a Windows Service do some manipulation of data, and then sending the data to a Windows App. I had posted a question of how we should do this and was...
2
by: DB | last post by:
Hi I have a specific problem of Access to Internal IIS and therefore need to have two Web Services to return the Dataset from one of them. The Internal Web Service Returns a Dataset of Addresses...
7
by: David P. Donahue | last post by:
My experience with databases using C# has been pretty limited thus far. Mostly I just use a SELECT statement to populate a DataSet, which is just read-only (mostly for display on a web page), or...
15
by: Joseph Geretz | last post by:
I'm a bit puzzled by the current recommendation not to send Datasets or Datatables between application tiers. http://support.microsoft.com/kb/306134 ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.