KSOAP - Cookie Support

03
Oct
We had a requirement to add mobile support to one of our projects. The requirement was to allow managers to access approval data via Java-enabled devices such as Blackberrys. We decided to, however go with the safe route of supporting MIDP 2 midlets instead of targetting specifically the BBs.

The midlet would be required to communicate to a JEE server via Web Services and should support WS security (We used XFire and ACEGI). For communicating, we settled on the KSOAP library, which worked pretty okay..but we hit a roadblock when we needed cookie support as well to KSOAP.

After a frustrating and fruitless Googling for a solution (mailing lists were not much help since KSOAP seems to be rather dead these days) , I decided to d/l the whole KSOAP libs and dependancies and got my hands dirty on the CVS copy of KSOAP and attempted adding cookie support.

So here's a modified version of the libs with cookie support for anyone who is facing the same problem. I also added a way to allow you to customize your SOAP headers so as to be able to send web services security headers etc. Just run the ANT build and deploy the .jars to your midp project. Cookies work by being stored into the device's local RecordStore.

ksoap.zip [5.4 MB]