0
<from uri="direct:validating-route" />
        <setBody>
            <simple>${body}</simple>
        </setBody>
        <log message="Mapping request from source to destination"
            loggingLevel="INFO" />
        <to
            uri="dozer:transformValidateWrapperType?mappingFile=mappings/validate-mapping.xml&amp;targetModel=in.map.loc.elements.ValidateWrapperType" />
        <log message="Completed MApping and sending request"
            loggingLevel="INFO" />
        <setBody>
            <simple>${body}</simple>
        </setBody>
        <setHeader headerName="operationNamespace">
            <constant>http://in.map.com/functions/tele/ap</constant>
        </setHeader>
        <to uri="cxf:bean:validateOutside" />

The body passed after the set body is null. This is the route for a SOAP request. How to get In the body of the exchange with the needed classes object in the camel route itself?

Seba anna
  • 21
  • 4
  • 1
    The you do do not make any sense as they set the body to itself. And if you have a empty/null body problem then see this FAQ: http://camel.apache.org/why-is-my-message-body-empty.html – Claus Ibsen Dec 22 '17 at 11:23
  • @ClausIbsen The route starts with a soap response in xml format with type ValidateWrapperType(java class-pojo). But it should be again added to the body in exchange so that the dozer mapper works. It is accessible if I do the exchange.getIn().getBody(ValidateWrapperType.class) in java. But i was trying to do it in xml itself so that I can eliminate the java class. – Seba anna Dec 29 '17 at 05:23

0 Answers0