Author |
Message
|
ins0mniac2 |
Posted: Thu Aug 02, 2007 10:49 am Post subject: subscription filter with xml namespaces |
|
|
Apprentice
Joined: 25 Jul 2005 Posts: 33
|
I wanted to know if content based routing supports xml namespaces in the payload.
I can register a subscription of Body.Test='SomeValue' and that works fine for the XML sample of <Test>SomeValue</Test>
However, if i have a sample of <m:Test xmlns:m="http://test.com">SomeValue</m:Test>
The subscription filter above doesn't work and it wont let me enter a different filter containing namespaces i.e. Body.m:Test='SomeValue'
Any clue as to how i can setup the filter to traverse the tree of the payload that contains namespaces. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 02, 2007 11:14 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
There's been some previous discussion on this.
I don't remember how it ended up being resolved. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ins0mniac2 |
Posted: Thu Aug 02, 2007 12:18 pm Post subject: |
|
|
Apprentice
Joined: 25 Jul 2005 Posts: 33
|
would you have a link to that discussion? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 02, 2007 12:28 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Not without searching for it. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ins0mniac2 |
Posted: Thu Aug 02, 2007 1:51 pm Post subject: |
|
|
Apprentice
Joined: 25 Jul 2005 Posts: 33
|
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 02, 2007 2:07 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
That's the conversation I remember.
I stand by what I said there - this *should* be possible, and if it doesn't work, then a PMR should be opened and I would expect this would lead to a fix.
But I don't know how to do it. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mymq |
Posted: Thu Aug 02, 2007 6:22 pm Post subject: |
|
|
Centurion
Joined: 01 Mar 2007 Posts: 101 Location: US-Greenwille
|
Yes i was the one raised the question initially. But i tried all the possible ways suggested in our forum. But nothing did work.
I did not have time to do further R&D and ended up with filterring it thru code. _________________ --SRK-- |
|
Back to top |
|
 |
AkankshA |
Posted: Thu Aug 02, 2007 7:55 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
|
Back to top |
|
 |
ins0mniac2 |
Posted: Fri Aug 03, 2007 6:11 am Post subject: |
|
|
Apprentice
Joined: 25 Jul 2005 Posts: 33
|
mymq
If you filtered through code, then anytime u wish to add a new filter criteria you will have to make coding changes rather then just changing a subscription correct?
I really would like to avoid going that route as this should be just a configuration change more then anything else.
Anybody else have any other suggestions as how to make this work? |
|
Back to top |
|
 |
ins0mniac2 |
Posted: Fri Aug 03, 2007 6:24 am Post subject: |
|
|
Apprentice
Joined: 25 Jul 2005 Posts: 33
|
Quote: |
you can use the XML parser, and reference an element that is in the format namespace:field because the XML parser treats this reference as one element called namespace:field. |
Im assuming this means refer to the field in the following manner Body.m:Test='SomeValue'
However, when putting that into the filter condition the subscription fails to be entered because of the ':' being present, putting the entire argument in quotes registers the subscription, but does not route the message to the desired queue. |
|
Back to top |
|
 |
mymq |
Posted: Fri Aug 03, 2007 6:27 am Post subject: |
|
|
Centurion
Joined: 01 Mar 2007 Posts: 101 Location: US-Greenwille
|
We just used MQRFH2 fields to do the same. And minor code changes in the Publisher flow. That is all. _________________ --SRK-- |
|
Back to top |
|
 |
|