The same http4 component does not support multiple sslContextParametersRef. We have added a validation in the next releases about that.
If you want 2+ sslContextParametersRef then you need one per different http4 component See the bottom of this page showing how to http://camel.apache.org/http4 On Fri, May 3, 2013 at 7:24 PM, apatel <apa...@asg.bellsouth.net> wrote: > Following things we have tried: > > * two routes with different "sslContextParametersRef" endpoint options. > * two routes with different "httpClientConfigurerRef" endpoint options > * two routes with different "httpClientConfigurerRef" AND " > > File: encoreSSLParams.groovy > ---------------------------------------------- > beans { > > > encoreSslKeyStoreParametersRef(org.apache.camel.util.jsse.KeyStoreParameters) > { > password = "xxxxx" > resource = > "${System.getProperty('NIMBUS_HOME')}/qa2certs/EncoreKeyStore.jks".toString() > } > > encoreSslTrustStoreParametersRef(org.apache.camel.util.jsse.KeyStoreParameters) > { > password = "xxxxx" > resource = > "${System.getProperty('NIMBUS_HOME')}/qa2certs/EncoreTrustStore.jks".toString() > } > > > encoreSslKeyManagersParametersRef(org.apache.camel.util.jsse.KeyManagersParameters) > { > keyStore = ref encoreSslKeyStoreParametersRef > keyPassword = "xxxxx" > } > > > encoreTrustManagersParametersRef(org.apache.camel.util.jsse.TrustManagersParameters) > { > keyStore = ref encoreSslTrustStoreParametersRef > } > > encoreSslContextParametersRef(org.apache.camel.util.jsse.SSLContextParameters) > { bean -> > bean.singleton = false > keyManagers = ref encoreSslKeyManagersParametersRef > trustManagers = ref encoreTrustManagersParametersRef > } > > } > > File: partialSSLParams.groovy > > beans { > > > partialSslTrustStoreParametersRef(org.apache.camel.util.jsse.KeyStoreParameters) > { > password = "weblogic1234" > resource = > "${System.getProperty('NIMBUS_HOME')}/qa2certs/EncoreTrustStore.jks".toString() > } > > > > partialTrustManagersParametersRef(org.apache.camel.util.jsse.TrustManagersParameters) > { > keyStore = ref partialSslTrustStoreParametersRef > } > > > partialSslContextParametersRef(org.apache.camel.util.jsse.SSLContextParameters) > { bean -> > bean.singleton = false > trustManagers = ref partialTrustManagersParametersRef > } > > } > > Beans File used for trying multiple configurators, as well as multiple > seperate clientConnectionManagers to see if using seperate > clientConnectionManagers where the ssl stuff was desired to be seperated > would help: > > > import org.apache.camel.component.http4.HttpClientConfigurer > import org.apache.camel.component.http4.HttpComponent > import org.apache.camel.component.http4.HttpEndpoint > import nimbus.ExtBeans.TracingHttp4.TracingHttp4Configurator > import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager > import org.apache.http.conn.scheme.SchemeRegistry; > > beans { > > http4ClientSchemeRegistry(SchemeRegistry) > tracingHttp4ClientSchemeRegistry(SchemeRegistry) > > http4ClientConnMgr(ThreadSafeClientConnManager, > ref("http4ClientSchemeRegistry")) > > tracingHttp4ClientConnMgr(ThreadSafeClientConnManager, > ref("tracingHttp4ClientSchemeRegistry")) > > tracingHttp4ConfiguratorBean(TracingHttp4Configurator) > > > } > > Two routes that you play with the see the effects: > > > Tracing test route: > <route xmlns="http://camel.apache.org/schema/spring" trace="true" > id="nimbus.ssltests:tracingHttp4Test:1.0" > > <from uri=\"servlet:///test/onMobileWith2WaySSL" /> > <setHeader headerName="Exchange.HTTP_URI"> > <constant>https4://xxxxxxxxx:443</constant> > </setHeader> > <to > uri="https4://dummy10?sslContextParametersRef=encoreSslContextParametersRef"/> > > </route> > > Non Tracing test route: > > <route xmlns="http://camel.apache.org/schema/spring" trace="true" > id="nimbus.ssltests:http4Test:1.0" > > <from uri=\"servlet:///test/onMobileWithSsl" /> > <setHeader headerName="Exchange.HTTP_URI"> > <constant>https4://xxxxxxxxxx:443</constant> > </setHeader> > <to > uri="https4://dummy20?sslContextParametersRef=partialSslContextParametersRef"/> > > </route> > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/https4-Apache-Camel-2-10-3-component-option-httpClientConfigurer-for-SSL-is-not-working-when-i-have-e-tp5731929p5731994.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen