324.8. 如何使用样式表转换 soap 标头

标头转换过滤器(HeaderTransformationMessageFilter.java)可用于转换 soap 请求的 soap 标头。如果要使用标头转换过滤器,请查看以下示例:

<bean id="headerTransformationFilter" class="org.apache.camel.component.spring.ws.filter.impl.HeaderTransformationMessageFilter">
    <constructor-arg index="0" value="org/apache/camel/component/spring/ws/soap-header-transform.xslt"/>
</bean

使用 camel 端点中定义的 bead

<route>
    <from uri="direct:stockQuoteWebserviceHeaderTransformation"/>
    <to uri="spring-ws:http://localhost?webServiceTemplate=#webServiceTemplate&amp;soapAction=http://www.stockquotes.edu/GetQuote&amp;messageFilter=#headerTransformationFilter"/>
</route>