public class ApacheHttpClient {
static DefaultHttpClient httpClient = null;
private ApacheHttpClient() throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException{
// Allow self-signed SSL certificates:
TrustStrategy trustStrategy = new TrustSelfSignedStrategy();
X509HostnameVerifier hostnameVerifier = new AllowAllHostnameVerifier();
SSLSocketFactory sslSf = new SSLSocketFactory(trustStrategy,
hostnameVerifier);
Scheme https = new Scheme("https", 443, sslSf);