Web services 如何在Mule而不是Mule&x27中显示来自Web服务的错误;s错误消息

Web services 如何在Mule而不是Mule&x27中显示来自Web服务的错误;s错误消息,web-services,mule,esb,mule-studio,Web Services,Mule,Esb,Mule Studio,例如,如果我直接向web服务发布了错误的帖子/帖子,它会给我以下信息: <prestashop> <errors> <error> <message><![CDATA[Internal error. To see this error please display the PHP errors.]]></message> </error> </error

例如,如果我直接向web服务发布了错误的帖子/帖子,它会给我以下信息:

<prestashop>
   <errors>
      <error>
         <message><![CDATA[Internal error. To see this error please display the PHP errors.]]></message>
      </error>
   </errors>
</prestashop>
这是我的骡子流

<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显示web服务的错误而不是这个一般消息(这个问题同时适用于REST和SOAP web服务)


谢谢

尝试添加一个涵盖所有情况的成功状态代码验证程序(您可以更具体):


我希望这会有所帮助。

使用MEL#[异常]提取错误有效负载。

它不会改变任何东西。还有其他方法吗?例如,如果传入的查询字符串中的id不存在于web服务中,它会向我发送以下消息:位置0处的意外字符(C)。无法分析“”(java.lang.IllegalArgumentException)。消息负载的类型为:StringTheException现已更改。你能发布整个堆栈跟踪吗?我想知道问题是否真的是侦听器,而现在请求者可能正在工作。
<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>