camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajaysam <>
Subject Setting SOAPHeaders for CXF Endpoint using Processor
Date Wed, 05 Jun 2013 03:48:16 GMT
I am having problems while setting SOAPHeader using camel processor
the main objective of this flow is expose REST endpoint, get the REST
request, convert it to SOAP message, set SOAP headers and make SOAP request,
after getting the response, convert it back to REST json. And I am facing
problem is setting SOAP headers. 

My flow is as follows:

Camel is exposing a CXF-REST  endpoint.
The call comes in successfully.
It goes to processor.
The processor extracts the Query Parameters and creates another POJO object. 
- which represents a SOAP Request object.
The processor also creates a SOAP Header and sets it as shown below
 List<SoapHeader> soapHeaders =
        if (soapHeaders == null) {
            // we just create a new soap headers in case the header is null
            soapHeaders = new ArrayList<SoapHeader>();
        // Insert a new header
        String xml = "<?xml version=\"1.0\"
encoding=\"utf-8\"?><outofbandHeader &quot;
hdrAttribute=\&quot;testHdrAttribute\&quot; &quot;
        SoapHeader newHeader = new SoapHeader(new
        // make sure direction is OUT since it is a response message.
        System.out.println("Added Header");
The return from processor is directed to camel:soapjaxb

	    		<camel:soapjaxb version="1.1"
Marshalling works and request pojo object is properly converted to soapBody
But I dont see header when i log the camel body and headers before making
soap call through cxf endpoint

Where am i going wrong?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message