3. Enterprise Integration Patterns

switch

Changes an exchange's target based on a series of XPath expressions.

Can be used in:

serviceProxy, api, stompProxy, swaggerProxy, if, registration, wsStompReassembler, interceptor, bean, internalProxy, transport and soapProxy

Syntax

<switch>
  <case >*
</switch>

Sample

<serviceProxy port="200">
  <switch>
	<case xPath="//express" url="http://shop.predic8.com/express/" />
	<case xPath="//order" url="http://shop.predic8.com/order/" />
	<case xPath="//complaint" url="http://shop.predic8.com/complaint/" />
  </switch>
</serviceProxy>

Child Elements

ElementsDescriptionCardinality
case Specifies a XPath expression and a target URL. 0..*

Tutorial

Versioning with a Content Based Router