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 » Setting the Opaque Element value

Post new topic  Reply to topic
 Setting the Opaque Element value « View previous topic :: View next topic » 
Author Message
alanuzi
PostPosted: Thu Aug 11, 2011 1:59 am    Post subject: Setting the Opaque Element value Reply with quote

Newbie

Joined: 10 Aug 2011
Posts: 3

Hi,

I am having difficulty in using the correct eSQL element name or X-Path name to leave an element of my XML unparsed. I do not want to access any of the child elements of this XML section, only use the whole section as a character string.

My setup is a MQInput node receiving XML (containing exception details) from a queue and passing it to a compute node which extracts data from the XML and calls a stored procedure. On the MQInput node Validation is set to none, message domain is XMLNSC and Parsing timing is 'On Demand'.

the xml is similar to this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Exception>
<ErrorReportingSystem>

...other tags...

<ExceptionText>
<File>/build/S610P/src/DataFlowEngine/BasicNodes/ImbThrowNode.cpp</File>
<Line>265</Line>
<Function>ImbThrowNode::evaluate</Function>
<Type>ComIbmThrowNode</Type>
<Name>Exception_Test#FCMComposite_1_3</Name>
<Label>Exception_Test.Throw</Label>
<Catalog>BIPv610</Catalog>
<Severity>1</Severity>
<Number>3020</Number>
<Text>User exception thrown by throw node</Text>
<Insert>
<Type>5</Type>
<Text>Exception Test Message - lets see what happens </Text>
</Insert>
</ExceptionText>
</ErrorReportingSystem>
</Exception>

(The ExceptionText is the most nested exception thrown from any flow which uses my error handling subflow.)

Unfortunately the info centre page doesn't have an example. I have tried the following opaque element settings:

//Exception/ErrorReportingSystem/ExceptionText
//XMLNSC/Exception/ErrorReportingSystem/ExceptionText
//WMQI_Message/Exception/ErrorReportingSystem/ExceptionText
//WMQI_Message/XMLNSC/Exception/ErrorReportingSystem/ExceptionText
//Root/XMLNSC/Exception/ErrorReportingSystem/ExceptionText
//InputRoot/XMLNSC/Exception/ErrorReportingSystem/ExceptionText
//Message/XMLNSC/Exception/ErrorReportingSystem/ExceptionText

Could anyone please advise?
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Thu Aug 11, 2011 3:21 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi

Have you tried //ExceptionText ?
If I remember //ExceptionText means when ever element exists in xpath notation.

--
Marko
Back to top
View user's profile Send private message Visit poster's website
alanuzi
PostPosted: Thu Aug 11, 2011 3:40 am    Post subject: Reply with quote

Newbie

Joined: 10 Aug 2011
Posts: 3

Hi Marko,

That worked great, thanks for your help

alan
Back to top
View user's profile Send private message
alanuzi
PostPosted: Thu Aug 11, 2011 4:23 am    Post subject: Reply with quote

Newbie

Joined: 10 Aug 2011
Posts: 3

For anyone else who was having my problem, the info center page i was looking at was: Specifying opaque elements for the XMLNSC parser

found here:

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac20990_.htm
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 11, 2011 4:41 am    Post subject: Reply with quote

Grand High Poobah

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

For an introduction to XPath, try here:

http://www.w3schools.com/xpath/default.asp
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
EnOne
PostPosted: Thu May 24, 2012 5:45 am    Post subject: Reply with quote

Centurion

Joined: 09 Oct 2002
Posts: 100
Location: Kansas City

I am trying to use opaque parsing using XMLNSC Parser options on the input note XPath and using the above example and information from the w3schools (http://www.w3schools.com/xpath/xpath_syntax.asp) all these should work

Code:

/XMLNSC/Exception/ErrorReportingSystem/ExceptionText
//Exception/ErrorReportingSystem/ExceptionText
//ErrorReportingSystem/ExceptionText
//ExceptionText


but only the following one does and it has to search the each element of the XMLTree for instances of the ExceptionText element.

Code:
//ExceptionText


I tried using "." and "/" as a separator and any search for parent/child combination failed

what would I use to get Opaque parsing to work with parent/child combinations?
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Thu May 24, 2012 5:50 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

kimbert is the best expert on this topic.

I found this which may help you:

Quote:
Each opaque element must be specified as an ESQL element name or an XPath expression of the form //prefix:name (or //name, if your input document does not contain namespaces).


If XPath is not working for you, you may try ESQL syntax while we're waiting for kimbert...
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu May 24, 2012 5:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You may need to include namespace qualifiers in your XPath expression.
Back to top
View user's profile Send private message
EnOne
PostPosted: Thu May 24, 2012 6:05 am    Post subject: Reply with quote

Centurion

Joined: 09 Oct 2002
Posts: 100
Location: Kansas City

I am not using namespaces but do I need to specify a lack of a namespace?
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 24, 2012 6:08 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
all these should work
No - only the last one should work. As lancelotinc has pointed out, this is documented here:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac21000_.htm
Quote:
but only the following one does and it has to search the each element of the XMLTree for instances of the ExceptionText element.
Almost right, but you are making an invalid assumption about how the XMLNSC parser works. I'm not going to explain that remark, but I can assure you that it's just as efficient as the other forms.
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 » Setting the Opaque Element value
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.