Example usage for org.apache.commons.httpclient HttpClientError HttpClientError

List of usage examples for org.apache.commons.httpclient HttpClientError HttpClientError

Introduction

In this page you can find the example usage for org.apache.commons.httpclient HttpClientError HttpClientError.

Prototype

public HttpClientError(String message) 

Source Link

Document

Creates a new HttpClientError with the specified detail message.

Usage

From source file:com.linkedin.d2.discovery.stores.glu.TrustingSocketFactory.java

private static SSLContext createEasySSLContext() {
    try {/*from   w w  w. j ava2 s  . c  om*/
        SSLContext context = SSLContext.getInstance("SSL");
        context.init(null, new TrustManager[] { new X509TrustManager() {
            public java.security.cert.X509Certificate[] getAcceptedIssuers() {
                return null;
            }

            public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) {
            }

            public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType) {
            }
        } }, null);
        return context;
    } catch (Exception e) {
        throw new HttpClientError(e.toString());
    }
}

From source file:com.jaspersoft.ireport.jasperserver.ws.IReportSSLSocketFactory.java

private static SSLContext createIRSSLContext() {

    try {//from w  w w .  java  2 s  .  c  om

        SSLContext context = SSLContext.getInstance("SSL");

        context.init(null, new TrustManager[] { new IReportTrustManager() }, null);

        return context;

    } catch (Exception ex) {

        ex.printStackTrace();

        throw new HttpClientError(ex.toString());

    }

}

From source file:com.utest.domain.service.util.TrustedSSLUtil.java

private static SSLContext createSSLContext() {
    try {/*w ww  .j av a  2s .com*/
        final SSLContext context = SSLContext.getInstance("SSL");
        context.init(null, new TrustManager[] { trustAllCerts }, null);
        return context;
    } catch (final Exception e) {
        throw new HttpClientError(e.toString());
    }
}

From source file:com.vmware.aurora.vc.vcservice.TlsSocketFactory.java

private SSLContext createEasySSLContext() {
    try {//from  ww w  .  j a v a  2s. com
        SSLContext context = SSLContext.getInstance("TLS");
        context.init(null, trustManagers, null);
        return context;
    } catch (Exception e) {
        LOG.error(e.getMessage(), e);
        throw new HttpClientError(e.toString());
    }
}

From source file:eu.europa.ec.markt.dss.validation.https.SimpleProtocolSocketFactory.java

private SSLContext createEasySSLContext() {
    try {/*from w  w w .j ava2  s .co m*/
        SSLContext context = SSLContext.getInstance("SSL");
        context.init(null, new TrustManager[] { new OptimistTrustManager() }, null);
        return context;
    } catch (Exception e) {
        LOG.severe(e.getMessage());
        throw new HttpClientError(e.toString());
    }
}

From source file:com.cazoodle.crawl.DummySSLProtocolSocketFactory.java

private static SSLContext createEasySSLContext() {
    try {/*from   w w w .  ja v a2s.com*/
        SSLContext context = SSLContext.getInstance("SSL");
        context.init(null, new TrustManager[] { new DummyX509TrustManager(null) }, null);
        return context;
    } catch (Exception e) {
        if (LOG.isErrorEnabled()) {
            LOG.error(e.getMessage(), e);
        }
        throw new HttpClientError(e.toString());
    }
}

From source file:com.trsst.client.AnonymSSLSocketFactory.java

/**
 * Create the SSL Context./*from w  w  w  . java2  s . co m*/
 * 
 * @return The SSLContext
 */
private static SSLContext createEasySSLContext() {
    try {
        SSLContext context = SSLContext.getInstance("SSL"); //$NON-NLS-1$
        context.init(null, new TrustManager[] { new X509TrustManager() {
            public void checkClientTrusted(X509Certificate[] chain, String authType) {
            }

            public void checkServerTrusted(X509Certificate[] chain, String authType) {
            }

            public X509Certificate[] getAcceptedIssuers() {
                return new X509Certificate[] {};
            }
        } }, null);
        return context;
    } catch (Exception e) {
        throw new HttpClientError(e.toString());
    }
}

From source file:com.fatwire.dta.sscrawler.EasySSLProtocolSocketFactory.java

private static SSLContext createEasySSLContext() {
    try {/*from   ww  w  .j ava2s.co m*/
        final SSLContext context = SSLContext.getInstance("SSL");
        context.init(null, new TrustManager[] { new EasyX509TrustManager(null) }, null);
        return context;
    } catch (final Exception e) {
        LOG.error(e.getMessage(), e);
        throw new HttpClientError(e.toString());
    }
}

From source file:com.alibaba.antx.config.resource.http.EasySSLProtocolSocketFactory.java

private static SSLContext createEasySSLContext() {
    try {/*from   ww  w .  j av a 2s .  c o  m*/
        SSLContext context = SSLContext.getInstance("SSL");
        context.init(null, new TrustManager[] { new EasyX509TrustManager(null) }, null);
        return context;
    } catch (Exception e) {
        LOG.error(e.getMessage(), e);
        throw new HttpClientError(e.toString());
    }
}

From source file:com.ctb.tdc.web.utils.EasySSLProtocolSocketFactory.java

private static SSLContext createEasySSLContext() {
    try {/*from  w ww.  jav a 2s. c  o m*/
        SSLContext context = SSLContext.getInstance("SSL");
        context.init(null, new TrustManager[] { new EasyX509TrustManager(null) },
                new java.security.SecureRandom());
        return context;
    } catch (Exception e) {
        throw new HttpClientError(e.toString());
    }
}