Forum Discussion
ganeshkumar_133
Nimbostratus
Sep 24, 2013XML based content routing
Hi all
We need a requirement to setup XML based content routing to the specific NODE.
Eg: Incoming request taking place via XML format which contains the string "12345" it should be routed to NODE-1,...
Kevin_Stewart
Employee
Sep 26, 2013Okay, try this:
XML profile configuration (namespace mapping is not required because the node you're looking for is not behind a namespace)
ltm profile xml /Common/xml-test-2 {
app-service none
defaults-from /Common/xml
multiple-query-matches disabled
namespace-mappings none
xpath-queries { //network-operator-code }
}iRule:
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when XML_CONTENT_BASED_ROUTING {
switch $XML_values(0) {
"12345" {
log local0. "send to node-1"
node 10.70.0.2 80
}
"67890" {
log local0. "send to node-2"
node 10.70.0.3 80
}
default {
log local0. "send to pool"
pool $default_pool
}
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
