I want to use android application to pass and get data from webservice, I have the wsdl
of that webservice. So which of the one i can use for data manipulation ksoap2
or retrofit 2
which is better.And if i use one of these what else is needed.
It depends on the architecture in which your services are written. Retrofit is used for rest services where as ksoap is used for soap services.
REST vs. SOAP There are significant differences between SOAP and RESTful web services. The bullets below break down the features of each web service based on personal experience.
REST
RESTful web services are stateless. You can test this condition by restarting the server and checking if interactions survive. For most servers, RESTful web services provide a good caching infrastructure over an HTTP GET method. This can improve the performance if the information the service returns is not altered frequently and is not dynamic. Service producers and consumers must understand the context and content being passed along as there is no standard set of rules to describe the REST web services interface. REST is useful for restricted-profile devices, such as mobile, for which the overhead of additional parameters are less (e.g., headers). REST services are easy to integrate with existing websites and are exposed with XML so the HTML pages can consume the same with ease. There is little need to refactor the existing site architecture. As such, developers are more productive because they don't need to rewrite everything from scratch; instead, they just need to add on the existing functionality. A REST-based implementation is simple compared to SOAP.
SOAP
The Web Services Description Language (WSDL) describes a common set of rules to define the messages, bindings, operations and location of the service. WSDL is akin to a contract to define the interface that the service offers. SOAP requires less plumbing code than REST services design (e.g., transactions, security, coordination, addressing and trust). Most real-world applications are not simple and support complex operations, which require conversational state and contextual information to be maintained. With the SOAP approach, developers don't need to write plumbing code into the application layer. SOAP web services, such as JAX-WS, are useful for asynchronous processing and invocation. SOAP supports several protocols and technologies, including WSDL, XSDs and WS-Addressing. Consuming a web service via a database stored procedure allows users to straight away update a database with information from different sources. Users can also schedule a job at regular intervals to get data updated periodically in the database.
For further details visit following link:
http://searchmicroservices.techtarget.com/tip/REST-vs-SOAP-Choosing-the-best-web-service