Android Using Soap Library or Rest WebServices
android
Solution
SOAP
Advantages:
- Langauge, platform, and transport agnostic
- Designed to handle distributed computing environments
- Is the prevailing standard for web services, and hence has better support from other standards WSDL and tooling from vendors
- Built-in error handling (faults)
- Extensibility
Disadvantages:
- Conceptually more difficult, more "heavy-weight" than REST
- More verbose
- Harder to develop, requires tools
REST
Advatages:
- Language and platform agnostic
- Much simpler to develop than SOAP
- Small learning curve, less reliance on tools
- Concise, no need for additional messaging layer
- Closer in design and philosophy to the Web
Disadvantages:
- Assumes a point-to-point communication model--not usable for distributed computing
- environment where message may go through one or more intermediaries
- Lack of standards support for security, policy, reliable messaging, etc., so services that have more sophisticated requirements are harder to develop ("roll your own")
- Tied to the HTTP transport model
In short i would say you'll be more performant with REST and use soap if you target High Level Application Security.
SOAP is simply too heavy for mobile communications but has a very wide tool support. For example, consultants love it because they can use tools to define the interface and generate the wsdl file and developers love it because they can use another set of tools to generate all the networking code from that wsdl file. Moreover, XML as representation has schemas and validators, which in some cases may be a key issue. (JSON and REST do have similar stuff coming but the tool support is far behind).
This link highlight the difference between Rest and Soap webServices, it helps me a lot.
Problem
I'm a little bit confused on Soap and Rest web services!! - which of them is better to consume - advantages and disadvantages of each one