ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IIB10: Mon Profile - what is xpath to get http input header?

Post new topic  Reply to topic
 IIB10: Mon Profile - what is xpath to get http input header? « View previous topic :: View next topic » 
Author Message
john.ormerod
PostPosted: Wed Dec 23, 2020 7:53 am    Post subject: IIB10: Mon Profile - what is xpath to get http input header? Reply with quote

Apprentice

Joined: 14 Feb 2017
Posts: 49

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
View user's profile Send private message Send e-mail
abhi_thri
PostPosted: Thu Dec 24, 2020 12:09 am    Post subject: Reply with quote

Knight

Joined: 17 Jul 2017
Posts: 516
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
View user's profile Send private message
fjb_saper
PostPosted: Sat Dec 26, 2020 9:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Sun Dec 27, 2020 11:27 am    Post subject: Re: IIB10: Mon Profile - what is xpath to get http input hea Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

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
View user's profile Send private message
john.ormerod
PostPosted: Wed Jan 06, 2021 1:57 am    Post subject: Reply with quote

Apprentice

Joined: 14 Feb 2017
Posts: 49

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
View user's profile Send private message Send e-mail
john.ormerod
PostPosted: Sun Jan 10, 2021 4:32 am    Post subject: Reply with quote

Apprentice

Joined: 14 Feb 2017
Posts: 49

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IIB10: Mon Profile - what is xpath to get http input header?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.