java.net.SocketException exception comes when the port that you are trying to reach is not closed or not available. It takes the amount of time you have specified for searching the port and then gets out.
Firstly, try to call this service on your mobile web browser to check whether it is available or not. If it does not show that means your device is not connected to the network on which this file resides.
It may be possible that your firewall is not allowing to ping your port. When you are doing with your emulator it works since its on same PC but in case of your real device it connects via local network and some time Firewall does not allow. Solution: unblock this request on firewall or try this by closing your firewall.