Hello, I'm trying to call a web service that uses certificates (
http://wss.aduanas.gub.uy/LuciaWsSecurity/Stock.svc?wsdl). Can you guys send
me a tutorial to do that?

In this project I can not use spring (I saw some tutorials using spring).
Exists a tutorial using only cxf to do that?


>From CXF site (http://cxf.apache.org/docs/ws-security.html), I saw that we
can put interceptors to do that:

import org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
...

Map<String,Object> inProps= new HashMap<String,Object>();
... // how to configure the properties is outlined below;

WSS4JInInterceptor wssIn = new WSS4JInInterceptor(inProps);
cxfEndpoint.getInInterceptors().add(wssIn);
cxfEndpoint.getInInterceptors().add(new SAAJInInterceptor()); // 2.0.x
only; not needed in 2.1+

Map<String,Object> outProps = new HashMap<String,Object>();
... // how to configure the properties is outlined below;

WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps);
cxfEndpoint.getOutInterceptors().add(wssOut);
cxfEndpoint.getOutInterceptors().add(new SAAJOutInterceptor());


But I can not find the method to get the cxfEndpoint from my classes. I'm
using snapshot 2.4.

Thanks!

Reply via email to