Search in sources :

Example 1 with SoapBinding

use of org.apache.cxf.binding.soap.SoapBinding 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)

Example 2 with SoapBinding

use of org.apache.cxf.binding.soap.SoapBinding in project camel by apache.

the class PayLoadDataFormatFeature method initialize.

@Override
public void initialize(Server server, Bus bus) {
    server.getEndpoint().put("org.apache.cxf.binding.soap.addNamespaceContext", "true");
    server.getEndpoint().getBinding().getInInterceptors().add(new ConfigureDocLitWrapperInterceptor(true));
    if (server.getEndpoint().getBinding() instanceof SoapBinding) {
        server.getEndpoint().getBinding().getOutInterceptors().add(new SetSoapVersionInterceptor());
    }
    // Need to remove some interceptors that are incompatible
    // See above.
    removeInterceptor(server.getEndpoint().getInInterceptors(), HolderInInterceptor.class);
    removeInterceptor(server.getEndpoint().getOutInterceptors(), HolderOutInterceptor.class);
    removeInterceptor(server.getEndpoint().getBinding().getInInterceptors(), SoapHeaderInterceptor.class);
    resetPartTypes(server.getEndpoint().getBinding());
    LOG.info("Initialized CXF Server: {} in Payload mode with allow streaming: {}", server, allowStreaming);
}
Also used : SetSoapVersionInterceptor(org.apache.camel.component.cxf.interceptors.SetSoapVersionInterceptor) ConfigureDocLitWrapperInterceptor(org.apache.camel.component.cxf.interceptors.ConfigureDocLitWrapperInterceptor) SoapBinding(org.apache.cxf.binding.soap.SoapBinding)

Example 3 with SoapBinding

use of org.apache.cxf.binding.soap.SoapBinding in project tomee by apache.

the class EjbEndpoint method init.

protected void init() {
    // configure handlers
    try {
        initHandlers();
    } catch (Exception e) {
        throw new WebServiceException("Error configuring handlers", e);
    }
    // Set service to invoke the target ejb
    service.setInvoker(new EjbMethodInvoker(this.bus, beanContext));
    // Remove interceptors that perform handler processing since
    // handler processing must happen within the EJB container.
    Endpoint endpoint = getEndpoint();
    removeHandlerInterceptors(bus.getInInterceptors());
    removeHandlerInterceptors(endpoint.getInInterceptors());
    removeHandlerInterceptors(endpoint.getBinding().getInInterceptors());
    removeHandlerInterceptors(endpoint.getService().getInInterceptors());
    // Install SAAJ interceptor
    if (endpoint.getBinding() instanceof SoapBinding && !this.implInfo.isWebServiceProvider()) {
        endpoint.getService().getInInterceptors().add(new SAAJInInterceptor());
    }
    // Install WSS4J interceptor
    ConfigureCxfSecurity.configure(endpoint, port);
}
Also used : SAAJInInterceptor(org.apache.cxf.binding.soap.saaj.SAAJInInterceptor) WebServiceException(javax.xml.ws.WebServiceException) Endpoint(org.apache.cxf.endpoint.Endpoint) CxfEndpoint(org.apache.openejb.server.cxf.CxfEndpoint) WebServiceException(javax.xml.ws.WebServiceException) SoapBinding(org.apache.cxf.binding.soap.SoapBinding)

Aggregations

SoapBinding (org.apache.cxf.binding.soap.SoapBinding)3 SAAJInInterceptor (org.apache.cxf.binding.soap.saaj.SAAJInInterceptor)2 Source (javax.xml.transform.Source)1 WebServiceException (javax.xml.ws.WebServiceException)1 ConfigureDocLitWrapperInterceptor (org.apache.camel.component.cxf.interceptors.ConfigureDocLitWrapperInterceptor)1 CxfMessageSoapHeaderOutInterceptor (org.apache.camel.component.cxf.interceptors.CxfMessageSoapHeaderOutInterceptor)1 SetSoapVersionInterceptor (org.apache.camel.component.cxf.interceptors.SetSoapVersionInterceptor)1 SAAJOutInterceptor (org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor)1 Endpoint (org.apache.cxf.endpoint.Endpoint)1 MessageModeInInterceptor (org.apache.cxf.jaxws.interceptors.MessageModeInInterceptor)1 MessageModeOutInterceptor (org.apache.cxf.jaxws.interceptors.MessageModeOutInterceptor)1 CxfEndpoint (org.apache.openejb.server.cxf.CxfEndpoint)1