Start a Project

Implementing SOAP client in android project using KSOAP2 library

 

SOAP is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks. This XML-based protocol consists of three parts:

However, Android does not provide any sort of SOAP library. We can either write our own or use some library  like kSOAP 2. The ksoap2-android library  provides a lightweight and efficient SOAP client library for the Android platform.

Now, Let us implement KSOAP2 library in Android project.

to sum up what we will do:

  1. Make a call to a SOAP web service.
  2. Read and parse the output
  3. Display the web server message in the Activity

Before calling actual web service we need to add following:

  1. Add Internet persmission to Android Manifest
<manifest xlmns:android...>
<uses-permission android:name=“android.permission.INTERNET” />
<application ...
</manifest>

     2.  Add  ksoap2-android-assembly-2.5.0-jar-with-dependencies .jar or above to android project.

Now, Let’s get started to create a SOAP request:

 

For ksoap2 library:

https://github.com/simpligility/ksoap2-android

Stay update for more!

 

Exit mobile version