con.connect() is the point where the actual HTTP connection is established over the net. HttpsURLConnection.openConnection() only does setup for this. So what it means is that you cannot connect to that URL with the parameters you are setting up with openConnection.
I know that is horribly vague, but that is what a failure at that point means. However, we can then go a little further knowing that the failure was specifically Permission Denied coming from java.net.SocketException. But since the Java spec only says that java.net.SocketException means "a connect error occurred", with the semantics of the textual message unspecified, we really cannot go much further. It probably means that your process did not have the privilege required to create a socket. But if that is not it (you did say you set the permission in the manifest), you should use Wireshark or some similar network monitoring tool to see if there are any bytes being exchanged at all, and see how far you get in the process of negotiating a secure socket. For I have seen such error message returned when key negotiation failed, too. On Sep 7, 11:28 pm, BASU PETLUR <bpet...@gmail.com> wrote: > I wrote this > HttpsURLConnection con = (HttpsURLConnection) new URL("Here my server > URL is provided").openConnection(); > con.setDoOutput(true); > con.setDoInput(true); > con.connect();// at this point im geting error saying > Java.net.SocketException:permission denied.. > > Actually im sending request to server after getting reques in XML > format i want parse using > > xr.parse(new InputSource("URL")); > > But its giving error at con.connect(); only... And i have added > INTERNET permission in manifest file.. > > Please help me out to solve this error.. -- 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