【问题标题】:How can I invoke SimpleWebServiceInboundGateway manually?如何手动调用 SimpleWebServiceInboundGateway?
【发布时间】:2016-09-21 20:42:59
【问题描述】:

我有一个接收电子邮件的IntegrationFlow。该电子邮件包含一条 SOAP 消息。如何使用 Spring 集成处理此 SOAP 信封?我可以把它转发给SimpleWebServiceInboundGateway吗?

@Bean
public IntegrationFlow mailListener() {
    return IntegrationFlows.from(
         Mail.pop3InboundAdapter("pop3://to:to@localhost:3110/INBOX").javaMailProperties(p -> p.put("mail.debug", "false")),
         e -> e.autoStartup(true).poller(p -> p.fixedDelay(1000)))
             .enrichHeaders(s -> s.headerExpressions(c -> c.put(MailHeaders.SUBJECT, "payload.subject")
             .put(MailHeaders.FROM, "payload.from[0].toString()")))
             .get();
}

【问题讨论】:

    标签: java spring soap java-8 spring-integration


    【解决方案1】:

    不使用 Spring Integration 邮件适配器。

    但是,您应该能够直接使用 Spring WS 的邮件传输,并将消息调度程序配置为路由到 Web 服务网关(即MessageEndpoint)。

    the spring ws documentation about the mail transport

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-28
      • 2022-01-15
      相关资源
      最近更新 更多