Results 1 to 3 of 3

Thread: AbstractRequestResponseScenarioTests and errorChannel

  1. #1

    Default 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. #2

    Default

    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.

  3. #3
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •