Reputation: 441
While calling wcf ksoap2 from android.
htp.call(SOAP_ACTION, soapEnvelop);
I am getting this exception.
java.net.ConnectException: failed to connect to /10.0.2.2 (port 52442) after 20000ms: connect failed: ENETUNREACH (Network is unreachable)
My code was working fine till last night but now its not.
Thanks in advance
Upvotes: 0
Views: 3151
Reputation: 13761
It's obvious it's not any router-firewall related problem as you are under the same net, so there are only three possibilities:
Can you open that URL from your browser in your computer manually? If yes, I'd suggest using some debugging tool to trace TCP packets (I don't know either what kind of operating system you use on the destination machine; if it's some linux distribution, tcpdump
might help).
All that assuming you have the android.permission.INTERNET
permission in your AndroidManifest.xml file.
Upvotes: 2