passing data from Android Client .net Webservice
I am working on client server for as many as 2 weeks and things are not going that good. I have a android client and .net web service as my server.
I have to collect the data from the android screens and want to send the data to server which will do my basic CRUD operations.
I had spent some time and managed to send data to server but it is limited for individual parameters like if i wan to send employee name i can send it using ksoap2 envelop and managed to get the data on my server.
but things are NOT FINE when i want to send class object which has employeename,employeeid, etc as its parameters.
I used KVM serializer to create a class employee with the fields above mentioned.
i can only able to retrieve data from server using KVM but not able to send data to server.
I read "Unlocking Android" (good book) book where the author said not to use ksoap if i am not expert in Ksoap. Now my question is w开发者_JS百科hat i have to use to get this thing working.
Please suggest me quickly so that i can work on it. i have deadline which i have already crossed.
Thanks Ishwar Naste
I would suggest you to use JSON serialization. Very simple, straightforward, and android has good support for it.
To debug issues, I would suggest the following:
- Use a .NET web service client to connect to the service.
- Use a tool like wireshark (http://www.wireshark.org/) or fiddler (http://www.fiddler2.com/fiddler2/) to view the exact http request being passed to the server from the client.
- Then capture the http request being sent from your android client and see what the differences are and tweak accordingly.
Good luck.
精彩评论