ERROR: 02-16 15:07:58.596: I/JSONObject(2856): rslt string::java.net.ConnectException: failed to connect to /192.168.137.161 (port 8080): connect failed: ENETUNREACH (Network is unreachable) WEB SERVICE IS DEPLOYED ON IIS.
public final String WSDL_TARGET_NAMESPACE = "http://www.dhyey.com/"; public final String SOAP_ADDRESS = "http://192.168.137.161/StellarWebService/StellarService.asmx"; public WebServices() { // TODO Auto-generated constructor stub } public String logincall(String username, String userpassword, String isAdmin) { final String SOAP_ACTION = "http://www.dhyey.com/Login_android"; final String OPERATION_NAME = "Login_android"; SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, OPERATION_NAME); PropertyInfo pi = new PropertyInfo(); pi.setName("UserName"); pi.setValue(username); pi.setType(String.class); request.addProperty(pi); pi = new PropertyInfo(); pi.setName("Password"); pi.setValue(userpassword); pi.setType(String.class); request.addProperty(pi); pi = new PropertyInfo(); pi.setName("isAdmin"); pi.setValue(isAdmin); 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(); } catch (Exception exception) { response = exception.toString(); } return response.toString(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)