"expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <html>@1:7 in java.io.InputStreamReader@40d0c7d8)"
<p>I have been using ksoap library to consume .net web service.
and i am getting this kind d error</p>

<p>"expected: START_TAG {<a href="http://schemas.xmlsoap.org/soap/envelope/" rel="nofollow">http://schemas.xmlsoap.org/soap/envelope/</a>}Envelope (position:START_TAG @1:7 in java.io.InputStreamReader@40d0c7d8)"</p>

<p>i have searched every where but i didnt got any good help.
Please help me out</p>

<p>Thanks in advance.</p>

<p>here is my code where i try to consume web service.</p>

<p>public class WebInvoke {</p>

<pre><code>private static final String NAMESPACE = "http://tempuri.org/" ;
private static final String METHOD_NAME = "login";
private static final String SOAP_ACTION = NAMESPACE + METHOD_NAME;
private static final String URL = "http://10.0.2.2/Service1.asmx";
private final SoapSerializationEnvelope envelope;


public WebInvoke()
{
    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

    PropertyInfo quotesProperty = new PropertyInfo();
    quotesProperty.setName("UserName");
    quotesProperty.setValue("admin");
    quotesProperty.setType(String.class);
    request.addProperty(quotesProperty);

    quotesProperty = new PropertyInfo();
    quotesProperty.setName("Password");
    quotesProperty.setValue("a");
    quotesProperty.setType(String.class);
    request.addProperty(quotesProperty);

    Log.e("Request Assign", request.toString());
    envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.dotNet = true;
    envelope.setOutputSoapObject(request);
    Log.e("Envelope Assign", envelope.toString());
}
public String Fetch()
{
    String result = "";
    HttpTransportSE httpRequest = new HttpTransportSE(URL);
    try
    {
        envelope.xsd = SoapSerializationEnvelope.XSD;
        envelope.enc = SoapSerializationEnvelope.ENC;

        httpRequest.setXmlVersionTag("&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;");

         Log.e("httpRequest.call", "httpRequest.call");
        httpRequest.call(SOAP_ACTION, envelope);
        SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
        result =  response.toString();
    }
    catch(Exception e)
    {
        //e.printStackTrace();
        Log.e("httpRequest.call Exception", e.getMessage());
    }
    return result;
}
</code></pre>

<p>}</p>
