Hi,
I believe you can do it by adding an interceptor to cxf bc provider's
outInterceptors list.
in this interceptor, you can get conduit from the outbound message, then
next should be same as your code...
Freeman
ning_sunrise wrote:
Hi:
I try do some flow like following soap-->servicemix cxf bc (with ws
security) -->servicemix cxf-se->servicmeix cxf-bc-provider --> external web
service.
The connection between servicmeix cxf-bc-provider --> external web
service is ssl.
My problem is we can not handle the ssl by using java
keystore/truststore file. We have to write our customize TrustManager, we
want to add code like following before we sent out soap request to external
ws.
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(com.mycompany.Service.class);
factory.setAddress(external ws url);
Session.service = (com.mycompany.Service) factory.create();
Client client = ClientProxy.getClient(Session.adc);
HTTPConduit http = (HTTPConduit) client.getConduit();
TLSClientParameters tls = new TLSClientParameters();
tls.setDisableCNCheck(true);
tls.setTrustManagers(new TrustManager[]{new MyCustomTrustManager()});
http.setTlsClientParameters(tls);
............
I can make the code work outside servicemix.
Does anyone know how to do it in servicemix BC or a working around?
Thanks
Ning
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com