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 » how to emit namespace independent fields to Business Monitor

Post new topic  Reply to topic
 how to emit namespace independent fields to Business Monitor « View previous topic :: View next topic » 
Author Message
harish_td
PostPosted: Tue Oct 06, 2015 9:10 am    Post subject: how to emit namespace independent fields to Business Monitor Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

Hello Experts,

I am trying to emit a XML field (numDigits) to the Business Monitor v8.5.6 from a IIB v9.0.0.4. My XML looks like the following -

Code:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="http://com.itso" xmlns:v1="http://com.ibm/xml/schemas/v1_0/>
   <soapenv:Header/>
   <soapenv:Body>
      <com:getPrime>
         <v1:numDigits>3</v1:numDigits>
      </com:getPrime>
   </soapenv:Body>
</soapenv:Envelope>


I have tried to use the following XPath
Code:
/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='getPrime']/*[local-name()='numDigits']


in the Data location setting of the monitoring tab to emit events. But no luck so far. Can you please guide me on how to emit namespace independent fields?

Thanks,
Harish


Last edited by harish_td on Tue Oct 06, 2015 10:16 am; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Tue Oct 06, 2015 9:34 am    Post subject: Re: how to emit namespace independent fields to Business Mon Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

harish_td wrote:
Can you please guide me on how to emit namespace independent fields?


Do you mean by this that you want to obtain (and include in the monitoring message) the value of numDigits irrespective of the namespace in which the parent getPrime tag resides?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
harish_td
PostPosted: Tue Oct 06, 2015 9:54 am    Post subject: Re: how to emit namespace independent fields to Business Mon Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

Vitor wrote:

Do you mean by this that you want to obtain (and include in the monitoring message) the value of numDigits irrespective of the namespace in which the parent getPrime tag resides?


Yes. That's what I am trying to achieve.
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Tue Oct 06, 2015 10:03 am    Post subject: Re: how to emit namespace independent fields to Business Mon Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

harish_td wrote:
Vitor wrote:

Do you mean by this that you want to obtain (and include in the monitoring message) the value of numDigits irrespective of the namespace in which the parent getPrime tag resides?


Yes. That's what I am trying to achieve.


That's not what your XML document says.

It says that numDigits has the same namespace as it's parent - "xmlns:com="http://com.itso""
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
harish_td
PostPosted: Tue Oct 06, 2015 10:17 am    Post subject: Re: how to emit namespace independent fields to Business Mon Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

mqjeff wrote:

That's not what your XML document says.

It says that numDigits has the same namespace as it's parent - "xmlns:com="http://com.itso""


Copy-paste error. I have now edited the sample message to be more reflective of what I am trying to achieve.

Actually, the namespaces that we will encounter in run-time could be different for each of the tags. So I am trying to emit the payload field regardless of which namespace, the parent or the child is buried within.

In fact the moment, I enter local-name() in the XPath editor, I am prompted with the following error.

Code:
The local-name XPath function in the $Root/XMLNSC/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='getPrime']/*[local-name()='numDigits']] Xpath is not supported
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Tue Oct 06, 2015 10:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

In ESQL you can say something like "*:fieldname" to indicate that you don't care what the (incoming tree) namespace is.

I'd guess there's someway to do this in Xpath, but I'm not sure.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
timber
PostPosted: Tue Oct 06, 2015 3:24 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

You might want to check what the info center says about the 'XPath' syntax used in monitoring events. I seem to remember that predicates ( the boolean expressions within the [] ) are not allowed. So this XPath would not be valid for a monitoring event data location:
Code:
/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='getPrime']/*[local-name()='numDigits']

But don't take my word for it - my memory may be faulty.
Back to top
View user's profile Send private message
harish_td
PostPosted: Tue Oct 06, 2015 11:05 pm    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

You are right Tim. Although the snippet conforms to XPath 1.0 and can retrieve the field in a standalone XSL file, it seems to upset the monitoring event component.

The only option i see is to pass the whole bitstream and then process only the fields that are to be tracked. This just shifts the complexity to the design of the monitor model. And then we have the issue of parsing, transmitting of a lot of data that is meant to be discarded.

Can you propose any other way forward?
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Wed Oct 07, 2015 5:19 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You could parse the message in the compute/java/mapping node or whatever into the data you want for the monitoring event, and then send it to a separate terminal.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
timber
PostPosted: Wed Oct 07, 2015 7:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

I agree - just what I was going to suggest
Back to top
View user's profile Send private message
Gemz
PostPosted: Thu Oct 08, 2015 2:37 am    Post subject: Reply with quote

Centurion

Joined: 14 Jan 2008
Posts: 124

Hi,

We use below XPath in monitoring profile xmls to extract required value.

Can you check whether it gives what you need ?

Code:
$Root//*[local-name() = 'getPrime']/*[local-name() = 'numDigits']

_________________
GemZ
"An expert is one who knows more and more about less and less until he knows absolutely everything about nothing...."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » how to emit namespace independent fields to Business Monitor
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.