XML profile trouble
Hi - I am trying to get an iRule in place that routes traffic based on XML content. I've done this before and it works ok, but this XMl string I have this time contains a namespace (which I'm not sure I understand yet...)
XML string is attached to this topic - I've removed the main part of xml to keep it simple:(see attached)
I've created the following XML profile and assigned it to the VIP:
profile xml Kobra_User_ID_Check {
defaults from xml
namespace mappings none
xpath queries "//kr:userId"
}
and I have an iRule on the VIP that looks like this:
when XML_CONTENT_BASED_ROUTING {
for {set i 0} { $i < $XML::count } {incr i} {
log local0. $XML::queries($i)
log local0. $XML::values($i)
if {([matchclass $XML::values($i) contains Kobra_migrated_users])} {
pool pool1
}
else {
pool pool2
}
}
}
Oh and a class/data group like this:
class Kobra_migrated_users {
"u94770"
}
Hopefully someone can help, please, I think its related to the namespace mappings and how they are referred to within the xml doc, but am stuck, I've tried various combinations, but its not even logging the entry into the ltm log.
Sam.