[android-developers] HttpHostConnectException
Hi, I am working on an Android application that calls a Web Service (installed on a remote host) using HttpClient. My application can access the Web Service successfully when runs on the emulator but when I upload it on the device and run it, it throws HttpHostConnectException: Connection to http://remote_host:8080 refused at httpClient.execute(). Actually, I have recently changed the WiFi network that my device is used to get connected to the Web Service. With the previous WiFi network my application ran successfully. Does anyone have any idea that what would be the cause of this problem? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ?? HttpHostConnectException: Connection to http://127.0.0.1 refused ??
HttpHostConnectException: Connection to http://127.0.0.1 refused This Android app is using (trying to use) the http libraries to post and retrieve from a web server. Running the app on the emulator connecting to the Apache server on the same box (localhost) it gives the Connection refused message: “HttpHostConnectException: Connection to http://127.0.0.1 refused” Entering the same URL, to http://127.0.0.1 , into the browser retrieves the info from the local server no problem. So the web server is running and the ports are open and stuff like that. Maybe there is a setting on Andriod needed to allow the connection? It is somewhere in socket-land this is happening because the web server never sees the Post (web logs show no activity related to this). The manifest file has the INTERNET permissions in it uses-permission android:name=android.permission.INTERNET/uses- permission Does anyone know why the connection to localhost (127.0.0.1) would be refused from within the Android application? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---