My webservice which was working fine, all of a suddenly it has stopped working. I see no exceptions in the logcat. I can invoke the webmethod of the service from the browser of my android device but its not working from my android app. here is my code

public class WebDataManipulator {

private final String NAMESPACE = "http://tempuri.org/";
private final String URL = "";
private final String METHOD = "InsertData";
private final String SOAP_ACTION = "";

public void insertData() {
    SoapObject request = new SoapObject(NAMESPACE, METHOD);

    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.dotNet = true;

    HttpTransportSE androidHttp = new HttpTransportSE(URL);

    try {
        androidHttp.call(SOAP_ACTION, envelope);
    } catch(Exception ex) {

Any ideas why it is not working now?

5 Years
Discussion Span
Last Post by JauntyIbbi

I have solved this issue myself. I am pointing out my mistake here so that it can be useful for the users who may face the similar issue and find this post in the future.

The mistake I commited here is that I did not change the default Namespace for my .NET web service. For .NET web services to work from android, you have to change the default namespace i.e. http://tempuri.org

On the android side, you need to set your SOAP_ACTION as YOURNAMESPACE/METHODNAME. That's it! You can now call the web service from your android device.


Edited by JauntyIbbi: more explanation

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.