Answered by:
Read data from DB and return it using web service in xml formatt ? Service is suppose to be consume by android .

Question
-
User532485037 posted
hi...
I need to write web service that read data from the database and need to return it to android client... there will be about 1000 rows to be return in xml formatt .
what is the best way ?
Sunday, December 8, 2013 3:41 AM
Answers
-
User1508394307 posted
The best way? The is only one way
1) create webservice
2) open connection to database and get data
3) return the required datahttp://sarangasl.blogspot.de/2010/09/create-simple-web-service-in-visual.html
http://www.sitepoint.com/net-web-services-5-steps/- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, December 8, 2013 3:46 AM -
User-742633084 posted
Hi gj11944,
For retrieving data from from database, you can consider using ADO.NET Entity Framework (plus LINQ query) which is quite simple an straightforward.
After you get data loaded in your .NET runtime, you can consider building a RESTful webservice to expose the data (as XML or JSON format) to your mobile client (android, iOS or windows phone, etc..). To build a RESTful service with .NET, you can consider using WCF REST service programming model:
#An Introduction To RESTful Services With WCF
http://msdn.microsoft.com/en-us/magazine/dd315413.aspx#WCF Web HTTP Programming Model Overview
http://msdn.microsoft.com/en-us/library/bb412172.aspx#Building and Testing WCF RESTful services
http://www.codeproject.com/Articles/344512/Building-and-Testing-WCF-RESTful-servicesor ASP.NET has provided built-in support on building RESTful service via Web-API feature:
#Build RESTful API's with ASP.NET Web API
http://www.asp.net/web-api/tutorials/hands-on-labs/build-restful-apis-with-aspnet-web-api#JSON and XML Serialization in ASP.NET Web API
http://www.asp.net/web-api/overview/formats-and-model-binding/json-and-xml-serialization- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, December 8, 2013 9:49 PM
All replies
-
User1508394307 posted
The best way? The is only one way
1) create webservice
2) open connection to database and get data
3) return the required datahttp://sarangasl.blogspot.de/2010/09/create-simple-web-service-in-visual.html
http://www.sitepoint.com/net-web-services-5-steps/- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, December 8, 2013 3:46 AM -
User-742633084 posted
Hi gj11944,
For retrieving data from from database, you can consider using ADO.NET Entity Framework (plus LINQ query) which is quite simple an straightforward.
After you get data loaded in your .NET runtime, you can consider building a RESTful webservice to expose the data (as XML or JSON format) to your mobile client (android, iOS or windows phone, etc..). To build a RESTful service with .NET, you can consider using WCF REST service programming model:
#An Introduction To RESTful Services With WCF
http://msdn.microsoft.com/en-us/magazine/dd315413.aspx#WCF Web HTTP Programming Model Overview
http://msdn.microsoft.com/en-us/library/bb412172.aspx#Building and Testing WCF RESTful services
http://www.codeproject.com/Articles/344512/Building-and-Testing-WCF-RESTful-servicesor ASP.NET has provided built-in support on building RESTful service via Web-API feature:
#Build RESTful API's with ASP.NET Web API
http://www.asp.net/web-api/tutorials/hands-on-labs/build-restful-apis-with-aspnet-web-api#JSON and XML Serialization in ASP.NET Web API
http://www.asp.net/web-api/overview/formats-and-model-binding/json-and-xml-serialization- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, December 8, 2013 9:49 PM