-2

i have implemented my android application with client server approach. Something like this approch here.

http://theopentutorials.com/tutorials/android/http/android-how-to-send-http-get-request-to-servlet-using-apache-http-client/

i don't understand the difference betweeen this approch and Restful webservice.I've to use optimize approach.plz help me...thanks in advance..

Girish Patel
  • 41
  • 1
  • 5

1 Answers1

0

This link provides just a way to link your android application to Servlet .

There are two basic approaches for webservices : 1.SOAP way where data goes in a XML with SOAP enevelope and body format . http://www.w3schools.com/webservices/ws_soap_example.asp

2.REST structure where data goes in JSON(it can go in XML as well ) , however there's no rule around data going in a SOAP body or header format e.g http://www.webmonkey.com/2010/02/get_started_with_rest/#Example_REST_Request

Basic idea is develop a webservice first then try to consume it . Best example here : http://www.vogella.com/tutorials/REST/article.html

sRiRaJ mISHrA
  • 86
  • 1
  • 7
  • Thank you for you answer.but with this servlet also i have received my data in JSON format so is it called a webservice? because with servlet also i have used HTTP protocol and json data exchange format.so can I call this a webservice? can't I simply deplot this servlet on webserver or i have to create a webservice for it? – Girish Patel Aug 28 '14 at 16:14