处理 ws:outbound-gateway 中的 404 错误 [英] handle 404 error in ws:outbound-gateway

查看:47
本文介绍了处理 ws:outbound-gateway 中的 404 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在使用 Spring 集成 4.3.5 的 ws:outbound-gateway 中处理 404 错误下面的错误,

Is there away to handle 404 error in ws:outbound-gateway am using Spring integration 4.3.5 error below,

[org.springframework.jms.listener.DefaultMessageListenerContainer] (jmsIn.container-1) JMS 消息侦听器执行失败,并且没有设置 ErrorHandler.:org.springframework.messaging.MessageHandlingException:消息处理程序中发生错误 [org.springframework.integration.ws.MarshallingWebServiceOutboundGateway#0];嵌套异常是 org.springframework.ws.client.WebServiceTransportException: Not Found [404]

[org.springframework.jms.listener.DefaultMessageListenerContainer] (jmsIn.container-1) Execution of JMS message listener failed, and no ErrorHandler has been set.: org.springframework.messaging.MessageHandlingException: error occurred in message handler [org.springframework.integration.ws.MarshallingWebServiceOutboundGateway#0]; nested exception is org.springframework.ws.client.WebServiceTransportException: Not Found [404]

推荐答案

添加ExpressionEvaluatingRequestHandlerAdvice 到网关;它允许您处理错误、抛出不同的异常或返回其他回复.

Add an ExpressionEvaluatingRequestHandlerAdvice to the gateway; it allows you to handle the error, throw a different exception, or return some other reply.

参见这里是关于向端点添加建议的一般性讨论.

这篇关于处理 ws:outbound-gateway 中的 404 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆