私は Mule を初めて使用し、interceptor-stack 要素の使用に問題があります。
以下は、こちらのドキュメントからそのまま引用されているようです: http://www.mulesoft.org/documentation/display/33X/Using+Interceptors
<interceptor-stack name="default">
<logging-interceptor/>
<timer-interceptor/>
</interceptor-stack>
<flow name="MyFlowFlow1" doc:name="MyFlowFlow1">
<interceptor-stack ref="default"/> <!--this is line 15 -->
<logger level="INFO" message="Got here"/>
</flow>
しかし、無効であるという例外が発生します。
誰かが私が間違っていることを教えてもらえますか?
org.xml.sax.SAXParseException; lineNumber: 15; columnNumber: 43; cvc-complex-type.2.4.a: Invalid content was found starting with element 'interceptor-stack'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":description, "http://www.mulesoft.org/schema/mule/core":abstract-message-source, "http://www.mulesoft.org/schema/mule/core":abstract-inbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor, "http://www.mulesoft.org/schema/mule/core":response}' is expected.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
...etc...
編集 - これは、以下の応答に対処するためのものです。
この最初のプライベート フローは、flow-ref を介して別のフローから呼び出されると完全に機能します。「ここに着きました」というメッセージとタイミングが表示されます。
<flow name="test2Flow1" doc:name="test2Flow1">
<timer-interceptor/>
<logger level="INFO" message="got here" doc:name="Logger"/>
</flow>
ただし、この 2 番目のプライベート フローは、別のフローから呼び出された場合は機能しません。実際、解析も行われません。唯一の違いは、タイマー インターセプターの明示的な使用が、タイマー インターセプターを含むインターセプター スタックへの参照に変更されることです。
<interceptor-stack name="default">
<timer-interceptor/>
</interceptor-stack>
<flow name="test2Flow1" doc:name="test2Flow1">
<interceptor-stack ref="default"/>
<logger level="INFO" message="got here" doc:name="Logger"/>
</flow>