Go to new doc!

+49 228 5552576-0


info@predic8.com

switch

Description

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

Can be used in

spring:beans, api, bean, if, interceptor, internalProxy, proxy, registration, request, response, serviceProxy, soapProxy, stompProxy, swaggerProxy, transport and wsStompReassembler

Syntax

1
2
3
4
<switch>
    <case >*
</switch>
Listing 1: switch Syntax

Sample

1
2
3
4
5
6
7
8
<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>
Listing 2: switch Example

Child Elements

Position Cardinality Description Element
1 1..* Specifies a XPath expression and a target URL. case

Tutorial

Versioning with a Content Based Router