If you just have two LBGs, please use XSL When and Otherwise . But if you think that the possible values of LBGs might increase in future, You can use the Key Value pair combination to match and retrieve from the header. Also, you need to add all the LBGs in the XML manager of the service.
The code looks something like the below
Key Value Pair:
<RoutingURL>
<LBG name="X">LBGX</LBG>
<LBG name="Y">LBGY</LBG>
<LBG name="Z">LBGZ</LBG>
</RoutingURL>
<xsl:value-of select ="RoutingURL/LBG[@name="$headerValue"]/text() "/>
------------------------------
R K
------------------------------
Original Message:
Sent: Wed February 07, 2024 10:31 AM
From: N k
Subject: XSLt question
Thanks for your response Charlie. Can you let me know how to implement the logic in xslt to check if no value is retrieved? Also can we directly define the LBG name in xslt?
------------------------------
N k
Original Message:
Sent: Wed February 07, 2024 10:12 AM
From: Charlie Sumner
Subject: XSLt question
Simply retrieve the request header and check the value. If it is X then set the routing variable to the host name LBGX, if there is no value retrieved, set the routing variable to the host name LBGY.
Both LBGX and LBGY must be configured in the XML Manager that the service is using.
------------------------------
Charlie Sumner
Original Message:
Sent: Tue February 06, 2024 03:17 PM
From: N k
Subject: XSLt question
Hi,
I have a requirement for routing to LBG based on HTTP request header. If http-request-header value is X route it to LBGX. If value is empty or null then route it to LBGY. Can anyone suggest how can we use xslt to achieve this
------------------------------
N k
------------------------------