Image may be NSFW.
Clik here to view.
Web Services and Service Oriented Computing has revolutionized the internet in the past decade. It is quite true that without web services most Apps in the App Store will not be that interesting!!
Mobile devices have a limited processing power so it becomes necessary to let a web server do the heavy lifting when it comes to computation. So in this tutorial I am bringing you a way to use RESTful webservice in your android app and parse the XML response.
The example web service that I am using is here. This web service lets you access current price of Stock based on its trading symbol.
Step 1: Know Thy Web Service
Before calling any web service you must know how to call it and what you will get in response. This web service is a RESTful service so calling it is easy using a GET request.
- GET /stockquote.asmx/GetQuote?symbol=string HTTP/1.1
- Host: www.webservicex.net