I am writing a camel endpoint which is as below,
<cxf:cxfEndpoint id="testService" address="/TestService"
serviceClass="com.test.test1.TestQuote" wsdlURL="wsdl/Test.wsdl">
<cxf:properties>
<entry key="dataFormat" value="PAYLOAD" />
<entry key="schema-validation-enabled" value="true" />
</cxf:properties>
</cxf:cxfEndpoint>
<camel:camelContext id="camelContext">
<camel:route id="test">
<camel:from uri="cxf:bean:testService" />
<camel:to uri="bean:requestValidator" />
</camel:route>
In the request validation i am trying to retrieve Soap headers in request validator class,
exchange.getIn().getHeaders();
But expected soap headers are not coming, looks like similar problem https://access.redhat.com/solutions/1504543
EDIT: Soap request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsc="http://common.com/common21" xmlns:urn="urn:srv.test:v1">
<soapenv:Header>
<wsc:AutHeader>
<wsc:SourceApplication>?</wsc:SourceApplication>
<wsc:DestinationApplication>?</wsc:DestinationApplication>
<wsc:authContext>
<wsc:userid>?</wsc:userid>
<wsc:credentials>?</wsc:credentials>
<wsc:id>1234</wsc:id>
</wsc:authContext>
</wsc:AutHeader>
</soapenv:Header>
<soapenv:Body>
<urn:CreateRequest>
<urn:createRequest>
<urn:customerNumber>12345678</urn:customerNumber>
</urn:createRequest>
</urn:reateRequest>
</soapenv:Body>
</soapenv:Envelope>
If i use String requestXML = exchange.getIn().getBody(String.class); , i am getting soapenv:body (body) node completely, but not soapenv:header node (headers)
Please suggest a way to get and set the SOAP Headers.