3. Enterprise Integration Patterns

switch

Version

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

Syntax

<switch>
<case >*
</switch>
<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>
<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

ElementDescriptionCardinality
case0..*

Can be used in