我们正在尝试使用Camel-Cxf/Fuse和Payload dataformat来调用Soap服务。有时客户端拒绝请求,说SOAPAction丢失,这是间歇性的。有没有办法让我们在服务调用期间专门设置SOAPAction?在什么情况下我们无法发送SOAPAction?下面是我们用于调用的配置。
<!-- CXF configuration pointing to WSDL URL and service Name -->
<cxf:cxfEndpoint id="abcSOAPCPOutbound"
wsdlURL="wsdl/FooService.wsdl"
endpointName="cNS:FooServiceSoap"
serviceName="cNS:FooService"
address="http://example.com/processRequest.asmx"
xmlns:cNS="http://www.example.com"
loggingFeatureEnabled="false">
<cxf:inInterceptors>
<ref bean="GZIPInInterceptor"/>
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="iuABCSOAPOutboundInterceptor"/>
</cxf:outInterceptors>
</cxf:cxfEndpoint>
<!-- Came route for invoking service with operationName header set -->
<route id="iuFooOutboundRoute">
<from uri="direct-vm:iuOutboundtoFoo"/>
<setHeader headerName="operationName" >
<constant>FooSync</constant>
</setHeader>
<convertBodyTo type="String"/>
<!-- Send to Colibrium -->
<to uri="cxf:bean:abcSOAPCPOutbound?dataFormat=PAYLOAD"/>
<process ref="extractHTTPStatusCode"/>
</route>如果在调用服务前将camel header设置为SOAPAction,会有什么问题吗?
发布于 2016-06-21 12:40:32
是,
使用与operationName相同的方法:
<setHeader headerName="SOAPAction">
<constant>DummyOperation</constant>
</setHeader>你可以在这里参考- http://www.javaworld.com/article/2078883/open-source-tools/java-tip-write-an-soa-integration-layer-with-apache-camel.html?page=4
https://stackoverflow.com/questions/37870807
复制相似问题