How to use webservices in android?

后端 未结 2 1737
天涯浪人
天涯浪人 2021-01-03 04:49

I want to know about how to call webservices in android I had done a lot of search from Internet and have read several tutorials but was not able to understand much and ma

相关标签:
2条回答
  • 2021-01-03 05:23

    Android Doesn't have it's own tool then you should use your own or use some Thing Like KSOAP2.

    You Can Use This.

    http://www.c-sharpcorner.com/UploadFile/88b6e5/how-to-call-web-service-in-android-using-soap

    0 讨论(0)
  • 2021-01-03 05:45

    The first reading I would suggest is this one - this is the W3School tutorial. Don't forget to read the related chapters included in this tutorial - Soap, Wsdl, etc - as this tutorial taken as a standalone would not be so valuable. This tutorial is not specifically related to Android but will give you all the information needed to understand the use and constraints of this kind of architecture, and then structure your project.

    Under Android, you will face the specific contraint of mobile phones and tablets: the network can be down, and is often down: in the tube, in a basement, in any area that have a bad network coverage. So you will have to take care of this, either by caching data or allowing the application to work in degraded mode when no network is available. These are just examples as I don't know your context.

    After that, Android is developed in Java, with a specific API that comes on top of the regular java.* packages. These are just tools to implement the client side. On server side, depending of whether you control these services, you may also have some implementation to do. If so, this can be Java, PHP, .Net, anything: one of the purpose of the web services architecture is to stay independant of the remote implementation to only care the exchange protocol. But reading your question, I think the two first points are more important (or have an higher priority let's say) than the implementation as they are prerequisites. (EDIT: Anyway, a useful discussion about that can be found here on StackOverflow.)

    0 讨论(0)
提交回复
热议问题