I am trying to consume wcf service in my android project but I am getting the following error
05-24 02:44:35.995: E/TAG(1731): Error: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <HTML>@2:7 in java.io.InputStreamReader@b41da630)
final String NAMESPACE = "http://tempuri.org/";
final String METHOD_NAME = "getWeather";
final String SOAP_ACTION = "http://tempuri.org/IService1/getWeather";
final String URL = "http://10.0.2.2:44482/Service1.svc";
SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
Request.addProperty("cityName", "Karachi");
SoapSerializationEnvelope soapEnvelop;
soapEnvelop = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelop.dotNet = true;
soapEnvelop.setOutputSoapObject(Request);
HttpTransportSE htp = new HttpTransportSE(URL, 15000);
// int jumpTime = 0;
// progress.setProgress(jumpTime);
htp.call(SOAP_ACTION, soapEnvelop);
response = (SoapObject) soapEnvelop.getResponse()
Well, Thanks guys for your contribution but I have solved my problem. The issue was IIS Express Server in Visual Studio 2013. I was trying to access my web service from android but IIS Express was maybe not configured or something. Anyway the solution is to change your server from project properties. Change from IIS Express to ASP.Net Application Development Server.
PS: Visual Studio 2013 does not support Visual Studio Application Development Server anymore.