16.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:cxfEndpoint id="testEndpoint" address="http://localhost:9000/SoapContext/SoapAnyPort">
<cxf:properties>
<entry key="dataFormat" value="PAYLOAD"/>
</cxf:properties>
</cxf:cxfEndpoint>
请注意,默认的 CXF 分配客户端不会发送特定的 SOAPAction 标头。因此,当目标服务需要特定的 SOAPAction 值时,它将使用键 SOAPAction (不区分大小写)在 Camel 标头中提供。