'Camel POJO to PAYLOAD

I'm handling a web service with camel xml ?dataFormat=POJO on the from

But a front end dev is shoving some data in a field now, and I need to check if it's populated before routing.

But xpath won't work on the SOAP envelope.

                <setHeader headerName="hasPdfAlready">
                    <xpath resultType="java.lang.String">
                    //EncodedPdf/text()
                    </xpath>
                </setHeader>

NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.cxf.message.MessageContentsList to the required type: org.w3c.dom.Document with value [BlahBlahAPIRequest@0123123123] 

I need it to be POJO dataformat cause all the other operations expect Soap envelopes.

But now I need to unwrap, in order to test with xpath (as though I had specified PAYLOAD earlier)

Any idea how to unwrap a soap message, in camel xml dsl, while keeping POJO dataformat? Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source