Consuming a .net web service returning a dataset in an ANDROID application
We have an EPOD application running on the windows mobile platform. We are now trying to port the same application to the ANDROID platform. The application uses a web service written in .net to communicate with the server and perform various functions. The web serv开发者_开发技巧ice returns a dataset, which we are unable to parse directly in the ANDROID application and view the details. We are trying KSOAP and the JSON ways. If anyone out there has done this before, please help us out. We have be trying to find a solution for a week without any success. If required, we can even modify the web service so that it returns an XML or a JSON object which we can then parse in the ANDORID application.
Any help / sample code will be much appreciated.
Thanks and Regards
Rajendran Menon
.Net services used in interoperable environments (= non .Net clients) should not use datasets. You have already find why. The best you can do is modifying the service to expose simple soap or json = use custom data objets as return values from you service operations.
.net service returning a dataset will be received as an xml document at client end, so without thinking too much about the integration, just grab some code which can call xml webservice and get data from it.
Since there are many ways to solve this, here are additional links that can help:
How to call a .NET web service from android?
http://lukencode.com/2010/04/27/calling-web-services-in-android-using-httpclient/
http://www.slideshare.net/sullis/connecting-to-web-services-on-android
Let me know if I can help you. I have prior experience with calling .net web services from java.
精彩评论