17

Looking for a good tutorial that can walk me through creating a web service application in Android. I have had difficulty finding something that is beneficial. Most of the web services I have seen are no longer existing.

I am looking for something relatively simple.

I found the solution on this site:

java.dzone.com/articles/invoke-webservices-android

If you use this : Add the external jar file for the KSOAP2 Library, Go to order and export tab and check the box next to the jar file. and Finally go to project tab and hit clean. if this doesn't work for you I will try to help walk you through. It worked for me!!

Raj
  • 22,346
  • 14
  • 99
  • 142
  • When you refer to a web service application do you mean the consumption of a service using the android sdk or creating a web service using something like PHP or C# and then also consuming it? – AngeloS May 14 '12 at 18:08
  • yes i posted my solution. but yes consuming a web service in android by creating an application –  May 14 '12 at 20:48

2 Answers2

16

The best web service tutorial I've seen, in terms of explanation and completness is here: http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/

It outlines how to create and use a PHP based web service utilizing JSON as a message format. It includes code from all the layers (Android, PHP, MySQL)

Gophermofur
  • 2,101
  • 1
  • 14
  • 14
5

some demo

with sample code

http://seesharpgears.blogspot.in/2010/10/ksoap-android-web-service-tutorial-with.html

First things first, so you should now go ahead and download the KSOAP library from Sourceforge Google code:

http://code.google.com/p/ksoap2-android/downloads/detail?name=ksoap2-android-assembly-2.4-jar-with-dependencies.jar&can=2&q=

http://seesharpgears.blogspot.in/2010/11/basic-ksoap-android-tutorial.html

Chintan Raghwani
  • 3,370
  • 4
  • 22
  • 33
  • yeah I have already downloaded that in my several other attempts. I will try this out thanks. –  May 14 '12 at 18:12
  • 1
    IMHO, SOAP-based web services have taken a back-seat to RESTful services especially in the mobile space. Check out this other SO post on the benefits of REST over SOAP especially for a beginner: http://stackoverflow.com/a/6978711/630996 – AngeloS May 14 '12 at 18:14
  • thanks I will look into that. I am going to repost this with a simple VERY SIMPLE web service tutorial I found that actually works. I was so pumped. I am using KSOAP2 because I have not gotten into the REST work and I am editting an existing application that already uses KSOAP2. I just wanted to learn myself how it works. –  May 14 '12 at 20:24
  • Just read into the RESTful library. Apparently it is not as secure as the KSOAP2 library because it is much less complicated. But I hear it is very efficient. Not something to use in business applications however. –  May 14 '12 at 20:51
  • @noob Deprecated by whom? The last release was in January 2015. – ajeh Apr 13 '15 at 17:05
  • @ajeh I made that statement more than a year ago. I have no idea now. Feel free to ignore it. – 0xC0DED00D Apr 14 '15 at 12:16