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 » Namespace problem in esql

Post new topic  Reply to topic
 Namespace problem in esql « View previous topic :: View next topic » 
Author Message
PRKUMAR
PostPosted: Wed Jan 22, 2014 6:35 am    Post subject: Namespace problem in esql Reply with quote

Apprentice

Joined: 04 Sep 2012
Posts: 36

My output format is xml and it looks like as below: (sample structure)
<dlv:DepartmentList xmlns:dlv = "http://www.xyz.com/Department-v2">
<dlv:Department>
--
--
</dlv:Department>
</dlv:DepartmentList>


I have created the structure using esql like below:
DECLARE DV2 NAMESPACE 'http://www.xyz.com/Department-v2'";
SET OutputRoot.XMLNSC.DV2:DepartmentList.(XMLNSC.NamespaceDecl)xmlns:dlv = DV2;
DECLARE dlist REFERENCE TO OutputRoot.XMLNSC.dlv:DepartmentList;
CREATE LASTCHILD OF dlist AS dlist NAME 'dlv:Department';
Though it is creating as <dlv:Department> , but while I am referring this it not parsing..what is the right syntax for to include a namespace prefix to add a child which created using 'CREATE LASTCHILD' statment.
Please help me.
Back to top
View user's profile Send private message
dogorsy
PostPosted: Wed Jan 22, 2014 6:49 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

The namespace prefix is case sensitive. In the set statement it is uppercase, further down it is lowercase.
Your CREATE statement is also wrong. Please look at the documentation on how to specify NAME and NAMESPACE.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 22, 2014 7:37 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You are also misunderstanding the usage of the ESQL namespace declaration.
You declare the ESQL namespace
You create the XML(NSC) declaration of the namespace and prefix.
However later down in the ESQL you use the namespace prefix of the xml(nsc) namespace declaration. ESQL doesn't care about that. It is only used for serialization of the message.

you need to use the ESQL NAMESPACE variable when accessing the treee.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu Jan 23, 2014 1:09 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The info center contains a lot of information on XMLNSC with namespaces. Search for 'XMLNSC namespace declaration'. If that does not help then
I suggest that you look at the XMLNSC Namespace sample.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
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 » Namespace problem in 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.