Search in sources :

Example 1 with MessageModeInInterceptor

use of org.apache.cxf.jaxws.interceptors.MessageModeInInterceptor in project camel by apache.

the class CXFMessageDataFormatFeature method setupEndpoint.

protected void setupEndpoint(Endpoint ep) {
    resetPartTypes(ep.getBinding());
    Class<?> fmt = Source.class;
    if (ep.getBinding() instanceof SoapBinding) {
        ep.getInInterceptors().add(new SAAJInInterceptor());
        SAAJOutInterceptor out = new SAAJOutInterceptor();
        ep.getOutInterceptors().add(out);
        ep.getOutInterceptors().add(new CxfMessageSoapHeaderOutInterceptor());
        ep.getOutInterceptors().add(new MessageModeOutInterceptor(out, ep.getBinding().getBindingInfo().getName()));
        fmt = SOAPMessage.class;
    } else {
        ep.getOutInterceptors().add(new MessageModeOutInterceptor(Source.class, ep.getBinding().getBindingInfo().getName()));
    }
    ep.getInInterceptors().add(new MessageModeInInterceptor(fmt, ep.getBinding().getBindingInfo().getName()));
    ep.put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
    // need to remove the wrapper class and holder interceptor
    removeInterceptors(ep.getInInterceptors(), REMOVING_IN_INTERCEPTORS);
    removeInterceptors(ep.getOutInterceptors(), REMOVING_OUT_INTERCEPTORS);
}
Also used : SAAJInInterceptor(org.apache.cxf.binding.soap.saaj.SAAJInInterceptor) SAAJOutInterceptor(org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor) MessageModeInInterceptor(org.apache.cxf.jaxws.interceptors.MessageModeInInterceptor) CxfMessageSoapHeaderOutInterceptor(org.apache.camel.component.cxf.interceptors.CxfMessageSoapHeaderOutInterceptor) MessageModeOutInterceptor(org.apache.cxf.jaxws.interceptors.MessageModeOutInterceptor) Source(javax.xml.transform.Source) SoapBinding(org.apache.cxf.binding.soap.SoapBinding)

Aggregations

Source (javax.xml.transform.Source)1 CxfMessageSoapHeaderOutInterceptor (org.apache.camel.component.cxf.interceptors.CxfMessageSoapHeaderOutInterceptor)1 SoapBinding (org.apache.cxf.binding.soap.SoapBinding)1 SAAJInInterceptor (org.apache.cxf.binding.soap.saaj.SAAJInInterceptor)1 SAAJOutInterceptor (org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor)1 MessageModeInInterceptor (org.apache.cxf.jaxws.interceptors.MessageModeInInterceptor)1 MessageModeOutInterceptor (org.apache.cxf.jaxws.interceptors.MessageModeOutInterceptor)1