|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Refering to namespaced elements in trace nodes? |
« View previous topic :: View next topic » |
Author |
Message
|
matoh |
Posted: Thu Apr 21, 2005 7:25 am Post subject: Refering to namespaced elements in trace nodes? |
|
|
Apprentice
Joined: 04 Mar 2005 Posts: 26
|
In a trace node you can trace out parts of messages using the ${path} notation, e.g:
Code: |
${Body.foo.fie.fum} |
However, if the elements of the message have namespaces associated with them, a named path does not work unless you indicate that namespace in the path elements, as I understand it.
However, trying o write:
Code: |
${Body.{fullnamespacepath}:foo.{fullnamespacepath}:fie.{fullnamespacepath}:fum} |
is not accepted - apparently whatever parses trace node settings cannot pair up matching braces.
Using absolute numbers like this:
Code: |
${Body.[1].[2].[3]} |
works for me, but seems like a fragile solution
So, is there a way of doing any of this:
*) Avoid specifying the namespace in the path given, even though the message uses namespaces?
*) Escape the braces?
*) Declare a namespace for use in the path? |
|
Back to top |
|
 |
alexey |
Posted: Fri Apr 22, 2005 7:11 am Post subject: |
|
|
 Acolyte
Joined: 18 Dec 2003 Posts: 62 Location: Israel
|
Hi!
You have two ways of working this out that I've tried:
1. If you know the namespace use somthing like this
Code: |
${Root.XMLNS."http://com.ibm":Test."http://com.ibm":a} |
2. If you don't know the namespace you could use a path like this:
Code: |
${Root.XMLNS.*:Test.*:a} |
I've tested both with message
Code: |
<ns:Test xmlns:ns="http://com.ibm"><ns:a>abc</ns:a><b>123</b></ns:Test> |
- works fine.
Good luck,
Alexey |
|
Back to top |
|
 |
matoh |
Posted: Wed Apr 27, 2005 12:31 am Post subject: |
|
|
Apprentice
Joined: 04 Mar 2005 Posts: 26
|
Worked like a charm! Many thanks! |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|