Is it possible to do routing (putting XML messages into a proper queue) according to values of elements or attributes?
E.g.
There are two XML documents:
123 (or 7676 )
456 (or 7676 )
I want to put the document with bankno=123 into A queue and the other one, with bankno=456, into B queue.
Is it possible?
If yes, could you send me an example of Schema Adjuncts that is doing this?
In X-Bridge examples I can see mainly routing based on a tag name or attribute name of a root element.
Hi,
the “which”-attribute of an “element” in a schema adjunct takes an XPath query. This allows arbitrary rules on the structure and content of a given XML document inside X-Bridge. The following rules forwards your first example document to queue “Queue1” and the second one to “Queue2”:
"Queue1?
“Queue2”
Regards
Hi!
Thanks for helping, but it still not working with my X-Bridge :-((
I’m using X-bridge version 1.1.1.1 from Starter Kit, maybe this is the problem?
I found a temorary substitution to xml file:
111
pice of schema adjunct file:
concat(“queue_”,substring(number,1,3))
and it will put this xml file into queue: queue_111
but why it’s not working something like this:
“queue1”
Do you have any idea? Thank’s for helping!
Artur Lange
Hi,
the “which”-attribute of an “element” in a schema adjunct takes an XPath query. This allows arbitrary rules on the structure and content of a given XML document inside X-Bridge. The following rules forwards your first example document to queue “Queue1” and the second one to “Queue2”:
"Queue1?
“Queue2”
Regards