Announcement Announcement Module
Collapse
No announcement yet.
limited xml namespace configuration within <chain> Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • limited xml namespace configuration within <chain>

    Hi,

    I tried to use payload-type-router within a chain thus:
    Code:
       <chain input-channel="input">
            <splitter>
                <beans:bean class="..."/>
            </splitter>
            <payload-type-router>
                <mapping type="com.example.Widget" channel="widgets" />
                <mapping type="com.example.Sprocket" channel="sprockets" />
            <payload-type-router>
        </chain>
    Unfortunately that fails since the xsd does not allow <payload-type-router> to be a child of <chain>

    It does work with a plain <router> but that is rather verbose:
    Code:
       <chain input-channel="input">
            <splitter>
                <beans:bean class="..."/>
            </splitter>
            <beans:bean class="org.springframework.integration.router.PayloadTypeRouter">
                <beans:property name="payloadTypeChannelMap">
                    <beans:map>
                        <beans:entry key="com.example.Widget" value-ref="widgets"/>
                        <beans:entry key="com.example.Sprocket" value-ref="sprockets"/>
                    </beans:map>
                </beans:property>
            </beans:bean>
    Is there a reason for this?

    Cheers,

    Martin

  • #2
    I think we just need to modify the schema to allow that. Could you please raise an issue in JIRA?

    Thanks,
    Mark

    Comment


    • #3
      Correct, a mere schema modification should do it. The MessageChainHandler was designed to be very lenient in what it accepts as a handler.

      Comment

      Working...
      X