Author |
Message
|
john.ormerod |
Posted: Wed Dec 23, 2020 7:53 am Post subject: IIB10: Mon Profile - what is xpath to get http input header? |
|
|
Apprentice
Joined: 14 Feb 2017 Posts: 43
|
Hello
I have added an http header to Postman to simulate a Global Txn Id coming from DataPower.
Code: |
X-Global-Transaction-ID : 7c4b7c375fe313c400001d50 |
In my Mon Profile, for the HTTP input node 'TxnStart', I want this header to be the Global Txn Id. However, this xpath doesn't work:
Code: |
<p:globalTransactionId p:queryText='$Root/HTTPInputHeader/X-Global-Transaction-ID' p:sourceOfId='query'/>
|
Unfortunately, in the Mon Event msgs, the Global Txn Id is empty.
What do I need to specify in the Mon Profile?
I've searched and searched for an example for an HTTP Input Header without success.
The Flow Exerciser shows it to be present
Code: |
<HTTPInputHeader>
<X-Original-HTTP-Command>POST http://localhost:7080/HTTPInputMessageFlow HTTP/1.1</X-Original-HTTP-Command>
<X-Global-Transaction-Id>7c4b7c375fe313c400001d50</X-Global-Transaction-Id>
|
i've looked hard for typos and differing case as the cause, but, naturally, I can't see any.
Grateful for any words of wisdom. |
|
Back to top |
|
 |
abhi_thri |
Posted: Thu Dec 24, 2020 12:09 am Post subject: |
|
|
 Chevalier
Joined: 17 Jul 2017 Posts: 418 Location: UK
|
hi...must admit that i haven't touched xpaths in a while, just wondering whether the it is the hypens in
Code: |
X-Global-Transaction-ID |
that is causing the issue and whether it need to be escaped |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Dec 26, 2020 9:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20447 Location: LI,NY
|
abhi_thri wrote: |
hi...must admit that i haven't touched xpaths in a while, just wondering whether the it is the hypens in
Code: |
X-Global-Transaction-ID |
that is causing the issue and whether it need to be escaped |
And here I thought that HTTP / HTTPS did not support a global transaction...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rekarm01 |
Posted: Sun Dec 27, 2020 11:27 am Post subject: Re: IIB10: Mon Profile - what is xpath to get http input hea |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1400
|
john.ormerod wrote: |
i've looked hard for typos and differing case as the cause, but, naturally, I can't see any. |
So, is that an uppercase "...-ID"?
john.ormerod wrote: |
Code: |
X-Global-Transaction-ID : 7c4b7c375fe313c400001d50 |
|
Or is it a mixed case "...-Id"?
john.ormerod wrote: |
Code: |
<HTTPInputHeader>
<X-Original-HTTP-Command>POST http://localhost:7080/HTTPInputMessageFlow HTTP/1.1</X-Original-HTTP-Command>
<X-Global-Transaction-Id>7c4b7c375fe313c400001d50</X-Global-Transaction-Id> |
|
If that is not the issue, then try adding a Trace node to display the parsed header, to compare with the desired XPath.
abhi_thri wrote: |
just wondering whether the it is the hypens |
The only constraint is that the name can't start with a hyphen. |
|
Back to top |
|
 |
john.ormerod |
Posted: Wed Jan 06, 2021 1:57 am Post subject: |
|
|
Apprentice
Joined: 14 Feb 2017 Posts: 43
|
Thanks rekarm01
You have spotted what I didn't see: '-Id' (as copied from the Flow Exerciser data) instead of '-ID'. Now I know where to look. It's either my mistake in Postman or IIB has made an executive decision and changed '-ID' to '-Id'.
Let me offer a Happy New Year in addition to my thanks.
As I segued from WAH to HAH, I will resolved in a week's time when my 'holiday' segues back to WAH.
Best regards, John |
|
Back to top |
|
 |
john.ormerod |
Posted: Sun Jan 10, 2021 4:32 am Post subject: |
|
|
Apprentice
Joined: 14 Feb 2017 Posts: 43
|
Resolved:
For a user-defined ('X-Xxx') incoming HTTP header, IIB changes the case of the letters after the final '-' to be: 'Uxxx' (i.e first letter is upper case, the rest are lower case.
For example, if the incoming header ends with '-xSPqR', it will be seen by the HTTP Input node as: '-Xspqr'.
Can anyone explain why IIB takes it upon itself to make this change? |
|
Back to top |
|
 |
|