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 » [Solved] Root reference in XMLNSC domain

Post new topic  Reply to topic
 [Solved] Root reference in XMLNSC domain « View previous topic :: View next topic » 
Author Message
tatyeong
PostPosted: Fri Jun 04, 2010 1:17 am    Post subject: [Solved] Root reference in XMLNSC domain Reply with quote

Acolyte

Joined: 16 Apr 2010
Posts: 52

I need to route to different label based on the XML message.

Let's say the first XML message is
<Msg1>
<Field1>abc</Field1>
</Msg1>

and the second XML message is
<Msg2>
<Field1>abc</Field1>
</Msg2>

Is there a way to reference that XML root tag in ESQL so that I can route to the correct label?

IF Inputroot.XMLNSC.???? = 'Msg1' THEN
SET OutputLocalEnvironment.Destination.RouterList.DestinationData.labelname = 'Msg1';
ELSE
SET OutputLocalEnvironment.Destination.RouterList.DestinationData.labelname = 'Msg2';
END IF;

Any suggestion/help is much appreciated


Last edited by tatyeong on Fri Jun 04, 2010 2:17 am; edited 1 time in total
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Jun 04, 2010 1:28 am    Post subject: Reply with quote

Jedi Council

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

Take a look at FieldName in the documentation. This may help
_________________
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
anek77
PostPosted: Fri Jun 04, 2010 1:43 am    Post subject: Reply with quote

Newbie

Joined: 04 Jun 2010
Posts: 3

Try something like this

Code:


IF FIELDNAME(InputRoot.XMLNSC.*[>]) = 'Msg1' THEN
    SET OutputLocalEnvironment.Destination.RouterList.DestinationData.labelname = 'Msg1';
ELSE
    SET OutputLocalEnvironment.Destination.RouterList.DestinationData.labelname = 'Msg2';
END IF;


Last edited by anek77 on Fri Jun 04, 2010 3:40 am; edited 1 time in total
Back to top
View user's profile Send private message
tatyeong
PostPosted: Fri Jun 04, 2010 2:16 am    Post subject: Reply with quote

Acolyte

Joined: 16 Apr 2010
Posts: 52

Thanks! It works great!
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 » [Solved] Root reference in XMLNSC domain
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.