12-14-2011 06:32 AM - edited 12-14-2011 06:35 AM
Hi,
I am trying to call a webservice, what it does is just authenticate the username and password and return a string either 1 or -1. While debugging it gets stuck at httpTransport.call() for like a minute or so then skip to exception giving the error "java.io.InterruptedIOException: Local connection timed out after ~ 120000".
String ret=null; String error=null; String SOAPLOGINACTION = "http://nettechltd.net/wwwroot/ttweb/Service1.asmx/Authenticatee"; String SOAPLOGINMETHOD = "Authenticate"; String WSDL_TARGET_NAMESPACE = "http://nettechltd.net/wwwroot/ttweb/Service1.asmx"; String SOAP_ADDRESS = "http://nettechltd.net/wwwroot/ttweb/Service1.asmx? WSDL"; SoapObject rpc = new SoapObject(WSDL_TARGET_NAMESPACE,SOAPLOGINMETHOD); rpc.addProperty("username","test123"); rpc.addProperty("password","test123"); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.encodingStyle = SoapSerializationEnvelope.XSD; envelope.setOutputSoapObject(rpc);
HttpTransport httpTransport = new HttpTransport(SOAP_ADDRESS); httpTransport.debug = true; httpTransport.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); try { httpTransport.call(SOAPLOGINACTION, envelope); ret = (envelope.getResult()).toString(); Dialog.alert(ret); } catch(Exception ex) {
error = ex.toString(); }
Any suggestions are welcome. ![]()
Solved! Go to Solution.
12-14-2011 06:47 AM
12-14-2011 06:54 AM
I am debugging simulator and yep MDS connection is checked.
12-14-2011 07:10 AM
12-14-2011 07:34 AM
12-14-2011 07:42 AM
12-14-2011 07:46 AM
12-14-2011 08:10 AM
12-14-2011 11:56 PM
Tried a different connection but still getting the same exception. How did you manage to get response? I rum the simulator with MDS enabled. I can make connection to ftp but in this case its doesn't work. Is there any other way i could call the web service?