Hi,

I have problem with camel cxf in payload mode. CxfPayload object does not
contain SOAP body element. I am using camel 2.11.0.

I have defined cxf endpoint like this - 

    <cxf:cxfEndpoint id="cxfEndpoint"
                     address="/Address"
                     wsdlURL="wsdl/WSDL.wsdl"
                     serviceClass="ServiceClass"
                     serviceName="a:ServiceName"
                     endpointName="a:EndpointName"
                     xmlns:a="https://a.org/ws";
                     loggingFeatureEnabled="true">
        <cxf:properties>
            <entry key="dataFormat" value="PAYLOAD"/>
        </cxf:properties>
    </cxf:cxfEndpoint>                                   
                                         
My ServiceClass is like this:

@WebServiceProvider(serviceName = "ServiceName")
@ServiceMode(Service.Mode.PAYLOAD)
public interface ServiceClass extends Provider<Source> {

    @Override
    Source invoke(Source source);
}

I have camel route with following fragment:

from("cxf:bean:cxfEndpoint").to(processor)

I am sending soap message like:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
    <soap:Header>
        <ns1:Header1 ....
        </ns1:Header1>
        <ns2:Header2 ....
        </ns2:Header2>
    </soap:Header>
    <soap:Body>
        <ns3:BodyElement ....
        </ns3:BodyElement>
    </soap:Body>
</soap:Envelope>

I have noticed that my requests are processed by various interceptors. One
of them is DocLiteralInInterceptor. It adds element from my soap
body(ns3:BodyElement) to MessageContentsList executing instruction - 

parameters.add(o);
 
Later it is set as message content.

Next interceptor is SoapHeaderInterceptor. It takes message content created
in previous interceptor(DocLiteralInInterceptor) and after some processing
adds ns1:Header1 to MessageContentList executing instruction - 

parameters.put(mpi, object);

It replaces my body element from previous interceptor with header. When my
message arrives to the processor CxfPayload object does not contain body
element.

What am I doing wrong?

Thank you



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-CXF-in-payload-mode-received-message-does-not-contain-body-element-tp5744375.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to