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 » accessing default namespace within ESQL

Post new topic  Reply to topic Goto page 1, 2  Next
 accessing default namespace within ESQL « View previous topic :: View next topic » 
Author Message
dyson
PostPosted: Tue Jun 05, 2012 10:57 am    Post subject: accessing default namespace within ESQL Reply with quote

Apprentice

Joined: 04 Apr 2011
Posts: 45

My messages flow needs to consume and tweek an xml with a default namespace but I can't access the message tree via ESQL, I'm using WMB 6.1. What am missing here are there issues with ESQL and accessing default namespaces?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Jun 05, 2012 11:01 am    Post subject: Re: accessing default namespace within ESQL Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

dyson wrote:
but I can't access the message tree via ESQL, I'm using WMB 6.1.


Would you care to explain why you can't access the message tree using ESQL?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
dyson
PostPosted: Tue Jun 05, 2012 11:10 am    Post subject: Reply with quote

Apprentice

Joined: 04 Apr 2011
Posts: 45

maybe I'm just missing something obvious but when I try set a variable I get nothing. I've tried a couple of diff versions:

set test = InputBody.POSLog.Transaction.RetailStoreID;
set tester = InputRoot.XMLNSC.POSLog.Transaction.RetailStoreID;
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Jun 05, 2012 11:12 am    Post subject: Reply with quote

Jedi Knight

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

Put a Trace node just after your Input node. Paste the result here, in [c o d e ] tags.
_________________
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
dyson
PostPosted: Tue Jun 05, 2012 11:15 am    Post subject: Reply with quote

Apprentice

Joined: 04 Apr 2011
Posts: 45

It works if modify the incoming xml so that the namespace has a specific prefix and then declare that namespace in the ESQL, but I don't think that's good solution.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 05, 2012 11:28 am    Post subject: Reply with quote

Grand High Poobah

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

dyson wrote:
It works if modify the incoming xml so that the namespace has a specific prefix and then declare that namespace in the ESQL, but I don't think that's good solution.


No it isn't.

If you know the element is in a namespace but don't know what namespace and don't care what namespace why not access the element in any namespace?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
dyson
PostPosted: Tue Jun 05, 2012 11:34 am    Post subject: Reply with quote

Apprentice

Joined: 04 Apr 2011
Posts: 45

it's in there:

[(0x01000000:Folder):XMLNSC = ( ['xmlnsc' : 0x7e13cb0]
(0x01000400:NamespaceDecl):XmlDeclaration = (
(0x03000100:Attribute):Version = '1.0' (CHARACTER)
(0x03000100:Attribute):Encoding = 'UTF-8' (CHARACTER)
)
(0x01000000:Folder )http://www.nrf-arts.org/IXRetail/namespace/:POSLog = (
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:sa = 'Lookup table for SA extensions' (CHARACTER)
(0x03000102:NamespaceDecl)http://www.w3.org/2000/xmlns/:xsi = 'http://www.w3.org/2001/XMLSchema-instance' (CHARACTER)
(0x03000102:NamespaceDecl):xmlns = 'http://www.nrf-arts.org/IXRetail/namespace/' (CHARACTER)
(0x03000100:Attribute )http://www.w3.org/2001/XMLSchema-instance:schemaLocation = 'http://www.nrf-arts.org/IXRetail/namespace/IBMPOSLog.xsd' (CHARACTER)
(0x01000000:Folder )http://www.nrf-arts.org/IXRetail/namespace/:Transaction = (
(0x03000000:PCDataField)http://www.nrf-arts.org/IXRetail/namespace/:RetailStoreID = ' 123' (CHARACTER) ...]
Back to top
View user's profile Send private message
dyson
PostPosted: Tue Jun 05, 2012 11:36 am    Post subject: Reply with quote

Apprentice

Joined: 04 Apr 2011
Posts: 45

by any namespace you mean:

set tester = InputRoot.XMLNSC.*:POSLog.Transaction.RetailStoreID;
?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 05, 2012 11:40 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

dyson wrote:
by any namespace you mean:

set tester = InputRoot.XMLNSC.*:POSLog.Transaction.RetailStoreID;
?




Except that you have to specify the namespace on EVERY element.
Back to top
View user's profile Send private message
dyson
PostPosted: Tue Jun 05, 2012 11:45 am    Post subject: Reply with quote

Apprentice

Joined: 04 Apr 2011
Posts: 45

That didn't work I guess I missunderstood ... I've also tried declaring the namespace and refrencing:
[
DECLARE arts NAMESPACE 'http://www.nrf-arts.org/IXRetail/namespace/';

set test = InputRoot.XMLNSC.arts:POSLog.Transaction.RetailStoreID;
]
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Jun 05, 2012 11:45 am    Post subject: Reply with quote

Jedi Knight

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

Please use [c od e ] tags.
_________________
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: Tue Jun 05, 2012 11:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

POSLog needs a namespace qualifier.

Transaction needs a namespace qualifier.

RetailStoreID needs a namespace qualifier.

EVERY element that has a namespace needs a namespace qualifier.
Back to top
View user's profile Send private message
dyson
PostPosted: Tue Jun 05, 2012 11:51 am    Post subject: Reply with quote

Apprentice

Joined: 04 Apr 2011
Posts: 45

Just tried
[
set tester = InputRoot.XMLNSC.*:POSLog.*:Transaction.*:RetailStoreID;
]

still no luck hows my syntax?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 05, 2012 11:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

lancelotlinc wrote:
Please use [c od e ] tags.

"[" and "]" are not [c o d e] tags.

dyson wrote:
still no luck


Take a user trace.
Back to top
View user's profile Send private message
dyson
PostPosted: Tue Jun 05, 2012 11:56 am    Post subject: Reply with quote

Apprentice

Joined: 04 Apr 2011
Posts: 45

Code:
got it ... sorry I'm being a little slow. I'll do the trace, thx.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » accessing default namespace within ESQL
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.