319.7. スタイルシートを使用して 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
上記で定義した bean を camel エンドポイントで使用する
<route> <from uri="direct:stockQuoteWebserviceHeaderTransformation"/> <to uri="spring-ws:http://localhost?webServiceTemplate=#webServiceTemplate&soapAction=http://www.stockquotes.edu/GetQuote&messageFilter=#headerTransformationFilter"/> </route>