Hello Dirk ,

I referred to this Page:- http://cxf.apache.org/docs/ws-security.html for
this implementation, i stuck in 
the line "  EndpointImpl jaxWsEndpoint = (EndpointImpl)
EndpointImpl.publish(WSDL_URL, new DemoCXF());
" (see code below), so i tried in different direction, let me know how can i
acheive this via annotations.

The complete steps i have mentioned in below URL:-

http://stackoverflow.com/questions/15703041/issues-in-x509-implementation-using-cxf-ws-in-jboss-7


Old Server Side implementation :--
------------------------------------

@WebService(name = "DemoCXF", serviceName = "DemoCXFService", portName =
"DemoCXFPort", targetNamespace = "http://test.org";)
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public class DemoCXF {

    @WebMethod()
    @WebResult(targetNamespace = "http://test.org";, name =
"updatedEmployee")
    public Employee processEmployeeSalary(
        @WebParam(partName = "employee", name = "employee", targetNamespace
= "http://test.org";) 
        Employee emp,
        @WebParam(partName = "incrementAmount", name = "incrementAmount",
targetNamespace = "http://test.org";)
        Long incrementAmount) {
        Map<String,Object> inProps= new HashMap<String,Object>();
        inProps.put(WSHandlerConstants.ACTION, "Signature");
        inProps.put(WSHandlerConstants.SIG_PROP_FILE, "server.properties");

        EndpointImpl jaxWsEndpoint = (EndpointImpl)
EndpointImpl.publish(WSDL_URL, new DemoCXF());

        Endpoint cxfEndpoint = jaxWsEndpoint.getServer().getEndpoint();

        WSS4JInInterceptor wssIn = new WSS4JInInterceptor(inProps);
        cxfEndpoint.getInInterceptors().add(wssIn);

        System.out.println("[DemoCXF] Method
Invoked....processEmployeeSalary");

        System.out.println("[DemoCXF] Before processing: " + emp);

        long incrementedSalary = emp.getEmpSalary() + incrementAmount;

        emp.setEmpSalary(incrementedSalary);

        System.out.println("[DemoCXF] After processing: " + emp);

        return emp;
    }
}



--
View this message in context: 
http://cxf.547215.n5.nabble.com/CXF-WSS4J-Interceptors-not-working-tp5727229p5727501.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to