例如,如果我直接向web服务发送了错误的post/put,它会给出以下结果:
<prestashop>
<errors>
<error>
<message><![CDATA[Internal error. To see this error please display the PHP errors.]]></message>
</error>
</errors>
</prestashop>但是,如果我路过Mule ESB,这个错误对我或其他开发人员都没有任何帮助。
500 Internal Server Error
Unexpected character (R) at position 0.
Response code 404 mapped as failure. Message payload is of type: BufferInputStream这是我在Mule中的流程
<http:request-config name="HTTP_Request_Configuration_PrestaShop4" host="host.org/api/customers/#[message.inboundProperties.'http.query.string']" port="port" doc:name="HTTP Request Configuration" protocol="HTTPS">
<http:basic-authentication username="keyU" password="keyP"/>
</http:request-config>
<flow name="prestaShopUpdateCustomerById">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8080" path="prestaShopUpdateCustomerById" doc:name="HTTP"/>
<logger level="INFO" message="#[message.payloadAs(java.lang.String)]" doc:name="Logger"/>
<http:request config-ref="HTTP_Request_Configuration_PrestaShop4" path="/" method="PUT" doc:name="HTTP">
<http:request-builder>
</http:request-builder>
</http:request>
</flow> 有没有可能让Mule显示the服务的错误而不是这个通用消息(这个问题适用于REST和SOAP the服务)。
谢谢
发布于 2015-02-25 00:28:54
尝试添加一个覆盖所有情况的成功-状态-代码-验证器(然后您可以更具体地):<http:request path="path" method="method" config-ref="requestConfig"> <http:success-status-code-validator values="0..599"/> </http:request>,我希望这会有所帮助。
发布于 2015-08-25 20:46:13
使用MEL #exception提取错误有效负载
https://stackoverflow.com/questions/28697724
复制相似问题