I have a problem with removing the "Host" and "org.apache.cxf.request.uri" headers from the In Message in camel exchange. I'm using a cxfrs client to call a rest end point. But before calling that I used removeHeaders tag and removed some unnecessary headers from the exchange. Some of the headers are removed. But I was unable to remove "Host" and "org.apache.cxf.request.uri" headers. They are temporarily removed from the flow just after the removeHeaders call. But they appear in the request call headers when calling using the cxf rs client. Following is a sample from my scenario.
............................... .............................. ${property.asd} == true && ${property.afd} == true
**<to uri="direct:removeUnnecessaryHeaders" />**
<setHeader headerName="CamelCxfRsUsingHttpAPI">
<constant>true</constant>
</setHeader>
<setHeader headerName="CamelHttpMethod">
<constant>PUT</constant>
</setHeader>
<setHeader headerName="CamelHttpPath">
<constant>/partner/managepartnerprofile</constant>
</setHeader>
<to uri="cxfrs:bean:aclient"/>
</when>
.................................. .................................
**<route>
<from uri="direct:removeUnnecessaryHeaders" />
<removeHeaders pattern="CamelCxfRsResponseGenericType|org.apache.cxf.request.uri|CamelCxfMessage|CamelHttpResponseCode|Host" />
</route>**