处理 ws:outbound-gateway 中的 404 错误 [英] handle 404 error in ws:outbound-gateway
问题描述
是否可以在使用 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屋!