JacaDoc | kSOAP2 Android | Github


2014-04-18 -- For more recent versions of kSOAP, please refer to the kSOAP2 Android project

2006-06-08 -- Full release of 2.1.1 fixing flusing problem while debugging the application.

2006-03-13 -- Beta release with some small changes and updated javadocs. Diffs between 2.0.x and this version are located here.

2006-03-08 -- Updates fixing some bugs and working towards a releasable version.

2006-02-05 -- The project is undergoing work to enhance testing increase stability and keep pushing forward development to remove bugs and apply new features


kSOAP2 is a lightweight library for use in constrained devices. It is not meant to be an all encompassing do-it-all library. However it is meant to interoperate with most popular SOAP engines.

Please note that SOAP introduces some significant overhead for web services that may be problematic for mobile devices. If you have full control over the client and the server, a simple REST / JSON based architecture may be more adequate.

kSOAP2 is made up of an XML parser, a de/serializer, and a transport layer.

XML Parser

The parser used in kSOAP2 is kXML an efficient Pull Parser type of parser.


This section is responsible for mapping the object representation to the xml representation and back again.  When using ComplexTypes in kSOAP, the objects that the serialization layer can operate on implement the KVMSerializable interface.  Since the J2ME platform (the primary target platform) doesn't have reflection, this interface provides a mechanism that the serializer uses to set and get properties on the anonymous object.  

To use this mapping service you need to "register" your "Serializable" objects so that the engine knows how to map the name it finds in the xml to the name of the class it will load the values into.  If the objects aren't complex types or the complex types aren't registered, the serializer can wrap the objects into SoapPrimitives or to SoapObjects.


The transport layer provides the mechanism on which the SOAP messages are exchanged between server and client.  Work is continuing to abstract this layer so that different types of transports can be "plugged in" for testing, or for other communication mediums.  The basic transport mechanisms that are currently included in the library are HttpTransport for J2ME platforms and HttpTransportSE for J2SE [1][2].

Differences to previous versions

kSOAP 2 is a complete redesign, taking the lessons learned from kSOAP 1.x into account. Some important changes are:

Unfortunately, the improvements will require some additional effort when porting applications from kSOAP 1 to kSOAP 2.

kSOAP 1 is deprecated and archived at ksoap.objectweb.org (thanks to the objectweb.org team for keeping the kSOAP 1 pages after the merger with enhydra.org).


The kSOAP JavaDoc and some examples are contained in the source distribution.

An online version of the kSOAP2 API can be found online here.

Help Wanted

If you have created an open source client for a web service that is open to anyone, please let us know, so we can reference it here or include it in the kSOAP examples!


[1] Efficient SOAP Binding for Mobile Web Services
Found in: The IEEE Conference on Local Computer Networks 30th Anniversary (LCN'05)l
By Kwong Yuen Lai, Thi Khoi Anh Phan, Zahir Tari
Publication Date: November 2005
pp. 218-225
[2] Enhanced Transport Bindings for Efficient SOAP Messaging
Found in: IEEE International Conference on Web Services (ICWS'05)
By Christian Werner, Carsten Buschmann, Tobias Jacker
Publication Date: July 2005
pp. 193-200