Help with calling a secure (SSL) webservice in Android.
- by mmattax
I'm new to Android and am struggling to make a call to an SSL web service for an Android Application. My code is as follows:
Log.v("fs", "Making HTTP call...");
HttpClient http = new DefaultHttpClient();
HttpGet request = new HttpGet("https://example.com/api");
try {
String response = http.execute(request, new BasicResponseHandler());
Log.v("fs", response);
} catch (Exception e) {
Log.v("fs", e.toString());
}
The Output is:
Making HTTP call...
javax.net.SSLPeerUnverifiedException: No peer certificate
Any suggestions to make this work would be great.
EDIT
I should note that this is a valid cert. It is not self-signed.