URI uri = new URI(endpoint.getLocationURI(), false); if (uri.getScheme().equals("https")) { ProtocolSocketFactory sf = new CommonsHttpSSLSocketFactory( endpoint.getSsl(), endpoint.getKeystoreManager()); Protocol protocol = new Protocol("https", sf, 443); HttpHost host = new HttpHost(uri.getHost(), uri.getPort(), protocol); this.host = new HostConfiguration(); this.host.setHost(host); } else { this.host = new HostConfiguration(); this.host.setHost(uri.getHost(), uri.getPort()); }
    public void start() throws Exception {        URI uri = new URI(endpoint.getLocationURI(), false);        if (uri.getScheme().equals("https")) {            ProtocolSocketFactory sf = new CommonsHttpSSLSocketFactory(                            endpoint.getSsl(),                            endpoint.getKeystoreManager());            Protocol protocol = new Protocol("https", sf, 443);            HttpHost host = new HttpHost(uri.getHost(), uri.getPort(), protocol);            this.host = new HostConfiguration();            this.host.setHost(host);        } else {            this.host = new HostConfiguration();            this.host.setHost(uri.getHost(), uri.getPort());        }        channel = endpoint.getServiceUnit().getComponent().getComponentContext().getDeliveryChannel();    }