【发布时间】:2016-09-08 23:45:48
【问题描述】:
是否可以在 spring 集成 xml 中从 spring 集成标头中设置 SOAP-ENV 标头?
我尝试了以下方法,并希望将 bId 填充到肥皂标题中
<int:chain id="soapcall" input-channel="soapchannel">
<int-xml:header-enricher>
<int-xml:header name="bId" expression="headers['bId']"/>
</int-xml:header-enricher>
<int-ws:outbound-gateway uri="${soap.url}" interceptor="myInterceptor">
</int-ws:outbound-gateway>
</int:chain>
但是实际输出没有标题。见下文:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:n1="http://namespace/n1">
<SOAP-ENV:Header/>
<SOAP-ENV:Body> ...
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
在调用出站网关之前,我还研究了链内的以下方法。似乎这个标题丰富器只将肥皂动作作为标题。所以这会抛出异常action headers not found
<int-ws:header-enricher >
<int-ws:soap-action expression="headers['bId']"/>
</int-ws:header-enricher>
我还查看了this 的帖子。但我无法在链中编译它。
【问题讨论】:
标签: spring soap spring-integration spring-ws