0
我試圖讓Mule記錄我的SOAP組件在以下流程中引發的異常。例如,如果我將它格式錯誤的xml作爲輸入傳遞給soapUI,我會得到一個有意義的輸出,但我希望能夠將其記錄在控制檯中或將其發送到JMS隊列。在Mule ESB中記錄SOAP錯誤
<jms:activemq-connector name="Active_MQ" brokerURL="tcp://localhost:61616" validateConnections="true" doc:name="Active MQ"/>
<flow name="CAB-Mule_WMBFlow1" doc:name="CAB-Mule_WMBFlow1">
<http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:8081/DemoCustomer" doc:name="HTTP" mimeType="text/xml">
<idempotent-redelivery-policy maxRedeliveryCount="3">
<dead-letter-queue>
<vm:outbound-endpoint path="error-queue" />
</dead-letter-queue>
</idempotent-redelivery-policy>
</http:inbound-endpoint>
<cxf:jaxws-service port="80" serviceClass="com.mulesoft.demo.DemoCustomer" doc:name="SOAP"/>
<component class="com.mulesoft.demo.DemoCustomerIntImpl" doc:name="Java"/>
<jms:outbound-endpoint queue="StudioIN" connector-ref="Active_MQ" doc:name="JMS"/>
<logger level="INFO" doc:name="Logger" message="Payload: #[payload]"/>
</flow>
<flow name="error" doc:name="error">
<component class="com.mulesoft.demo.ExceptionService" doc:name="Java"/>
<jms:outbound-endpoint queue="Error" connector-ref="Active_MQ" doc:name="JMS"/>
</flow>
ExceptionService就是:
public class ExceptionService {
public void onException(ExceptionMessage e) {
System.err.println("EXCEPTION MESSAGE:::: " + e.getException().getMessage());
}
}
似乎沒有爲我工作,我沒有得到記錄器消息到控制檯和錯誤隊列也沒有得到任何消息。我是否也必須設置全球例外策略? – 2013-02-19 22:21:35