This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Android and the fly likes How to implement ksoap webservices in Android Emulator? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "How to implement ksoap webservices in Android Emulator?" Watch "How to implement ksoap webservices in Android Emulator?" New topic
Author

How to implement ksoap webservices in Android Emulator?

Debtaru Basak
Greenhorn

Joined: Jul 30, 2004
Posts: 3
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

Joined: Mar 22, 2000
Posts: 12759
    
    5
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

Joined: Oct 12, 2008
Posts: 1369
    
    1

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.

[List of FAQs] | [Android FAQ] | [Samuh Varta]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to implement ksoap webservices in Android Emulator?
 
Similar Threads
how install in Eclipse(Java/Android) emulator for Tablet PC Android
Web Services
What Hardware For Android
Reg: SOAP communication
Android - Enterprise Mobile Apps