I have a problem where my message headers are being dropped. The route looks
like
<camel:route>
<camel:from
uri="jetty:http://0.0.0.0:{{jetty.port}}/rest/?matchOnUriPrefix=true" />
<camel:log message="Message received from jetty"/>
<camel:to
uri="cxfbean:restfulService?headerFilterStrategy=#keepAllMessageHeadersStrategy"
/>
<camel:log message="Message updated after CXF"/> <!-at this point,
the headers are gone -->
<camel:to uri="bean:parser?method=handleHeaders" />
</camel:route>
Now I've been trying to keep ALL of the headers via configuring a header filter
strategy, but it doesn't seem to have any impact:
<bean id="keepAllMessageHeadersStrategy"
name="keepAllMessageHeadersStrategy"
class="org.apache.camel.component.cxf.CxfHeaderFilterStrategy">
<!-- Set relayHeaders to false to drop all SOAP headers -->
<property name="relayAllMessageHeaders" value="true"/>
<property name="relayHeaders" value="false"/>
</bean>
<!-parsing details:-->
<bean id="parser" name="parser" class="motive.Parser">
</bean>
<util:list id="restfulService">
<ref bean="parser"/>
</util:list>
I have tried relayAllMessageHeaders set to both true/false and all permutations
with relayHeaders being set to true/false. My CXF bean doesn't do anything
other than parse the Body. Directly after calling to the cxfbean, all of the
headers are dropped. Now I'm using Camel 2.6.0, so I'm a bit behind the times,
but the docs still seem to apply and I haven't found any bugs that look to be
triggering issues with my efforts. The CxfHeaderFilterStrategy is definitely
being applied because I get exceptions/errors if I remove the "#" symbol, but
it doesn't seem to have any impact.
Can someone tell me what I need to do to keep ALL of my headers after the
cxfbean call?
Thanks,
Zach Calvert