Announcement Announcement Module
Collapse
No announcement yet.
AbstractRequestResponseScenarioTests and errorChannel Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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"/>

  • #2
    I found this situation occurs when there are more than one subscriber to a channel. The SI test classes need to be the only one which creates the subscriber.

    Comment


    • #3
      If you define "ws-errorChannel" as a <publish-subscribe-channel/> it should allow all subscribers to receive the messages.

      Comment

      Working...
      X