AbstractRequestResponseScenarioTests and errorChannel
I have been using a subclass of AbstractRequestResponseScenarioTests for unit test, and it has been working great until one use case.
I have a int-xml:xpath-router with a default-output-channel="ws-errorChannel" for when no xpath-expression is found. If I configure the xpath-router to have "resolution-required="false", it will route to the default-output-channel, but it seems no end point is found and I always get an assert error of "java.lang.AssertionError: message was not handled on ws-errorChannel".
For when a mapping value cannot be found, should I be using default-output-channel with resolution-required?
Code:
<int-xml:xpath-router id="ws-routeByServiceName"
input-channel="ws-headerWithProtocolChannel"
default-output-channel="ws-errorChannel"
resolution-required="false"
>
<int-xml:xpath-expression id="ws-serviceNameXpath"
expression="//*/Context/service"/>
<int-xml:mapping value="Service1" channel="ws-SimpleEchoResponderChannel"/>
</int-xml:xpath-router>
I was not able to set up stream:stdout be a endpoint for the errorChannel, should this work?
Code:
<int-stream:stdout-channel-adapter
id="ws-stdout-channel-adapter"
append-newline="true"
channel="ws-errorChannel"/>