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 = "";
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 {, envelope);
    } catch(Exception ex) {

Any ideas why it is not working now?

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.

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.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.