android - Getting java.io.IoException while calling .net web service from my java code -


my code:

import org.ksoap2.soapenvelope; import org.ksoap2.serialization.propertyinfo; import org.ksoap2.serialization.soapobject; import org.ksoap2.serialization.soapserializationenvelope; import org.ksoap2.transport.httptransportse;  import android.util.log; import android.widget.toast;  public class callsoap {     public final string soap_action = "http://tempuri.org/sendmessage";      public final string operation_name = "sendmessage";      public final string wsdl_target_namespace = "http://tempuri.org/";      public final string soap_address = "http://omega-solutions.in/expertsapp.asmx";      public callsoap() {     }      public string call(string deviceid, string msg) {         soapobject request = new soapobject(wsdl_target_namespace,                 operation_name);         propertyinfo pi = new propertyinfo();         pi.setname("deviceid");         pi.setvalue(deviceid);         pi.settype(string.class);         request.addproperty(pi);         pi = new propertyinfo();         pi.setname("msg");         pi.setvalue(msg);         pi.settype(string.class);         request.addproperty(pi);          soapserializationenvelope envelope = new soapserializationenvelope(                 soapenvelope.ver11);         envelope.dotnet = true;          envelope.setoutputsoapobject(request);          httptransportse httptransport = new httptransportse(soap_address);         object response = null;         try {                httptransport.call(soap_action, envelope);                   response = envelope.getresponse();             log.e("after", "" + "after");         } catch (exception exception) {              log.e("before", "" + "before" + exception.tostring());             response = exception.tostring();         }         return response.tostring();     } } 

when run code

httptransport.call(soap_action, envelope); 

i getting java.io.ioexception after above line of code.

please check web method of web service whether have closed connection or not.because have faced same problem after closing sql connection of web method in web service has been resloved.... al best.!!!!!


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -