18.19. 使用通用 CXF Dispatch 模式
camel-cxf 组件支持通用 CXF 分配模式,该模式可以传输任意结构的消息(例如,不绑定到特定的 XML 模式)。要使用此模式,只需省略指定 CXF 端点的 wsdlURL 和 serviceClass 属性。
<cxf:cxfEndpoint id="testEndpoint" address="http://localhost:9000/SoapContext/SoapAnyPort"> <cxf:properties> <entry key="dataFormat" value="PAYLOAD"/> </cxf:properties> </cxf:cxfEndpoint>
请注意,默认的 CXF 分配客户端不会发送特定的 SOAPAction 标头。因此,当目标服务需要特定的 SOAPAction 值时,会使用 key SOAPAction 在 Camel 标头中提供它(不区分大小写)。