I have a simple test case to demonstrate this issue. Here is the camel route:
And the camel-cxf consumer endpoint:
I have explicitly set "dataFormat" to default PAYLOAD just for clarity purpose.
In this simple camel route, I try to change the entire body to a String XML message. As a result, the client will get an empty response back (I mean an empty soap envelope). The reason is due to following method:
Obviously it will return a null object back because it tries to get a body of CxfPayload type. And I also know that above camel route will work fine if I use MESSAGE dataFormat instead.
However, the strange behaviour aries if I refresh camel-jaxb bundle in Karaf container. The client will get a non-empty response from OKResponse.xml file and everything works fine now. It looks like that when I refreshed camel-jaxb bundle, camel-core's FallbackConverter kicked in and it helped CXF consumer to convert the payload object into POJO.
If I refreshed camel-core bundle, then above test case would stop working and client would get an empty response (empty soap envelope) back, again. So it looks like that when camel-core bundle's was refreshed, it's new activator was not able to load converters from camel-jaxb bundle since the bundle was already there. So only refreshing of the camel-jaxb bundle would enable camel-core to load the FallbackConverter again, thus helps the test route to work.
I also tried to change "start-level" of the camel-jaxb bundle to a value much higher than '50', say '80', then it would work the most times.