Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to implement ksoap webservices in Android Emulator?

 
Debtaru Basak
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to access a remote DB2 database from Android Emulator.
Could any one tell me the detailed steps of implementing ksoap web services from Android Emulator?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last entry in the sourceforge page for Ksoap was over 3 years ago.

If all you need to do is create a SOAP formatted request in some well documented format and read a SOAP formatted response you will be better off with a simpler approach.

What is the state of the documentation for the service you want to access?

Several years ago I helped a client set up a simple application for submitting data to a SOAP service by plugging a few variables into a text template and using standard Java net methods to send the request. MUCH simpler and faster than any SOAP toolkit.

Bill
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are no classes in Android library that help in consuming SOAP based web services. You can search this forum for similar discussions. It seems Google, is a proponent of REST based Webservices and I think it is justified given the constraints of a mobile device and overhead of XML processing in SOAP.

However, if SOAP is what you want then, according to me, you can either adapt KSOAP for Android
1. I believe Anddev.org has a tutorial that you might find interesting: KSOAP tutorial

or use the solution that Bill suggested in the last two lines of his post:
Several years ago I helped a client set up a simple application for submitting data to a SOAP service by plugging a few variables into a text template and using standard Java net methods to send the request. MUCH simpler and faster than any SOAP toolkit.

Get the WSDL file and generate request templates from it(using SOAPUI tool or sth similar). Insert place holders for values and replace them later from code by user-provided values(String.replaceAll()). Create a HttpPost instance and post this to the service End point using DefaultHttpClient class.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic