Hi tomplfe,
How are you doing?
Have you got any progress on this issue or does the suggestion in my last
reply help you some? If you still have any question on this, welcome to
post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
--------------------g: 7bit
From:
st*****@online.microsoft.com ("Steven Cheng")
Organization: Microsoft
Date: Tue, 30 Sep 2008 03:59:31 GMT
Subject: RE: Web service to return xml file
Hi tomplfe,
From your description, I understand that you're developing a webservice
which read data from an Access database and return the data back to
webservice client. You're currently wondering how to make the data return
as an XML Document, correct?
Regarding on the problem, I think there are two main sub problems here:
1. How do we generate the XML document/xml format data based on the record
retrieved from the Access database
2. How do we return such an generated XML Document in webservice to client
Which one are you currently focus on or are you struggling on both of them?
IMO, for the two issues, you can consider the following approaches:
1. As for generating xml document, if your webservice use .NET 3.5, then I
strongly recommend you use LINQ to XML since it extremely simplify the XML
document generation and processing.
#Creating XML Trees
http://msdn.microsoft.com/en-us/library/bb387068.aspx http://weblogs.asp.net/scottgu/archi...o-xml-and-how-
to-build-a-custom-rss-feed-reader-with-it.aspx
If LINQ to XML is not usable, you may need to manually use System.Xml
namespace's API or .NET xml serialization to generate the XML document.
2. For return the XML document/file to webservice client. You can directly
define your webservice's return type as XmlDocument and return the
generated Xml Document out. Do not use string type , that 's not correct.
Or you can even setup a simple ASP.NET httphandler which accept some
querystring as parameter and return the XML document(generated) via the
Response.WriteFile or Response.Write and set page's Contenttype as
text/xml.
How do you think?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "TompIfe" <tp******@community.nospam>
Subject: Web service to return xml file
Date: Mon, 29 Sep 2008 10:48:41 +0200
Hi,
I have a web service that reads data from an Access database using
datareader and place the data in an array that
the web method returns.
Now, I want to make the web service also to return an xml file with the
data.
How do I best proceed?
Best regards,
Tom