【发布时间】:2014-11-17 15:42:41
【问题描述】:
Spring-WS 提供以下支持作为其模板的一部分。
试图确定 Spring Integration 是否公开了这一点。从 2012 年找到以下内容,但我希望它会成为框架的一部分。
http://forum.spring.io/forum/spring-projects/integration/119981-ws-outbound-gateway-and-soap-fault
【问题讨论】:
Spring-WS 提供以下支持作为其模板的一部分。
试图确定 Spring Integration 是否公开了这一点。从 2012 年找到以下内容,但我希望它会成为框架的一部分。
http://forum.spring.io/forum/spring-projects/integration/119981-ws-outbound-gateway-and-soap-fault
【问题讨论】:
不,我们还不支持。
正如我所说的:随时提出 JIRA 问题! :-)
【讨论】:
基于 2012 链接的解释的示例配置 ...
@Bean
@Description("Workaround for non conforming services")
AbstractWebServiceOutboundGateway initializeWebserviceGateway(
@Qualifier("wsOutboundGateway.handler") Object bean) {
Advised advised = (Advised) bean;
AbstractWebServiceOutboundGateway gateway = null;
try {
gateway = (AbstractWebServiceOutboundGateway) advised
.getTargetSource().getTarget();
} catch (Exception e) {
throw new IllegalStateException("Unable to configure webServiceTemplate for non conforming services");
}
DirectFieldAccessor dfa = new DirectFieldAccessor(gateway);
WebServiceTemplate wst = (WebServiceTemplate) dfa
.getPropertyValue("webServiceTemplate");
wst.setCheckConnectionForError(false);
wst.setCheckConnectionForFault(false);
return gateway;
}
【讨论】: