cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Cheng <christopher.sw.ch...@gmail.com>
Subject Using clustering with SSL?
Date Wed, 04 Sep 2013 14:35:39 GMT
I am using CXF version 2.4.2 and I am trying to connect a cluster with 3 IP
addresses and I want to disable the SSL certificate check, but I found out
that SSL cert check disabled only works for the original endpoint, but not
for others in alternate addresses. How could I also configure for other
addresses as well?


Client client = ClientProxy.getClient(port);
HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
TLSClientParameters tlsParams = new TLSClientParameters();
TrustManager[] trustAllCerts = new TrustManager[]{new FakeTrustManager()};
tlsParams.setTrustManagers(trustAllCerts);
tlsParams.setDisableCNCheck(true);
httpConduit.setTlsClientParameters(tlsParams);
 FailoverFeature failoverFeature = new FailoverFeature();
RetryStrategy failoverStrategy = new RetryStrategy();
List<String> alternateAddress=new ArrayList<String>();
alternateAddress.add("https://2.2.2.2:4433/MyService.asmx");
alternateAddress.add("https://3.3.3.3:4433/MyService.asmx");
failoverStrategy.setAlternateAddresses(alternateAddress);
failoverStrategy.setMaxNumberOfRetries(5);
failoverStrategy.setDelayBetweenRetries(2000);
failoverFeature.setStrategy(failoverStrategy);
failoverFeature.initialize(client , client .getBus());

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message