【发布时间】:2017-10-12 13:03:08
【问题描述】:
以下场景使用 apache camel 2.14.0、spring-ws 1.5.9 和 axiom 1.2.9
场景 - 当我们的soap服务被调用时,它应该可选地返回一个错误 - 这个错误应该在响应中作为肥皂错误
问题检测
我已经检测到问题: - Spring-WS 的 org.springframework.ws.soap.axiom.AxiomHandler(2.3.0) 不创建 SOAPFault 对象 - org.apache.axiom.soap.impl.llom.SOAPBodyImpl (1.2.15) 不再检查元素的本地名称
问题 有没有更好的方法来处理 apache camel 的肥皂故障?
- 一种可能性是使用 throwException,但如果出现功能错误,我的日志将包含大量堆栈跟踪
片段 下面是骆驼配置的sn-p
<camel:from uri="spring-ws:uri:/contextPath/soapServices?endpointMapping=#endpointMapping"/>
<camel:to uri="bean:someBean" />
<camel:choice>
<camel:when>
<camel:xpath>//error</camel:xpath>
<camel:to uri="xslt:transform_event_response_to_soapfault.xslt?saxon=true" />
</camel:when>
</camel:choice>
</camel:from>
【问题讨论】:
标签: apache-camel spring-ws axiom