我從移除「Host」和「org.apache.cxf.request.uri」標頭時遇到問題在消息中駱駝交換。我正在使用cxfrs客戶端來調用休息終點。但在調用之前,我使用removeHeaders標記並從交換中刪除了一些不必要的標題。一些標題被刪除。但我無法刪除「主機」和「org.apache.cxf.request.uri」標題。它們在removeHeaders調用後暫時從流中移除。但是在使用cxf rs客戶端調用時,它們出現在請求調用頭中。以下是我的場景中的示例。從駱駝交換中刪除「Host」和「org.apache.cxf.request.uri」標頭
............................... .............. ................ $ {} property.asd真正== & & $ {} property.afd真正==
**<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>**