Camel-CXF POJO dataformat with WS-Security does not work when operation has javax.xml.ws.Holder type in parameter list. CXF just throws an "java.lang.IllegalArgumentException: argument type mismatch" exception.
But when tried without WS-Security, the same use case works fine. Here is the sample operation:
@WebService(targetNamespace = "http://demo.fusesource.com/wsdl/CustomerService/", name = "CustomerService") @XmlSeeAlso({ObjectFactory.class, com.fusesource.demo.customer.ObjectFactory.class}) public interface CustomerService { ... ... ... @WebMethod(action = "http://www.example.org/CustomerService/getCustomerStatus") @RequestWrapper(localName = "getCustomerStatus", targetNamespace = "http://demo.fusesource.com/wsdl/CustomerService/", className = "com.fusesource.demo.wsdl.customerservice.GetCustomerStatus") @ResponseWrapper(localName = "getCustomerStatusResponse", targetNamespace = "http://demo.fusesource.com/wsdl/CustomerService/", className = "com.fusesource.demo.wsdl.customerservice.GetCustomerStatusResponse") public void getCustomerStatus( @WebParam(name = "customerId", targetNamespace = "") java.lang.String customerId, @WebParam(mode = WebParam.Mode.OUT, name = "status", targetNamespace = "") javax.xml.ws.Holder<java.lang.String> status, @WebParam(mode = WebParam.Mode.OUT, name = "statusMessage", targetNamespace = "") javax.xml.ws.Holder<java.lang.String> statusMessage ); }
Please see attached test case for more detail.