2016-02-08 25 views
1

對於哪些是所有介體onError序列的工作原理?WSO2 ESB-錯誤處理 - 對錯誤序列

ex:我試過Enrich調解器,它沒有工作,併發送調解器它的工作。

<inSequence onError="errorhandler" xmlns="http://ws.apache.org/ns/synapse"> 
<enrich> 
    <source clone="true" type="custom" xpath="//Body/xs"/> 
    <target action="replace" property="ORIGREQUES" type="property"/> 
</enrich> 

這裏定XPath是錯誤的。在wso2Carbon.log中得到了下面的消息。

ERROR {org.apache.synapse.mediators.elementary.EnrichMediator} - 通過的xpath 指定的節點無法找到。 {} org.apache.synapse.mediators.elementary.EnrichMediator


<api xmlns="http://ws.apache.org/ns/synapse" name="addTripService" context="/trip" hostname="localhost" port="8280"> <resource methods="POST" uri-template="/add/v2" faultSequence="fault"> 
    <inSequence onError="errorhandler"> 
    <enrich> 
     <source clone="true" xpath="//Body/xs"/> 
     <target type="property" property="ORIGREQUES"/> 
    </enrich> 
    <send/> 
    </inSequence> 

這裏得到什麼我的ErrorHandler序列已經給出了錯誤信息。

這意味着onError序列適用於發送中介而不適用於豐富介體。那麼請讓我知道它適用於哪些所有中介?

在此先感謝。

回答