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 » FIELDTYPE - XMLNSC.Folder - Resolved

Post new topic  Reply to topic
 FIELDTYPE - XMLNSC.Folder - Resolved « View previous topic :: View next topic » 
Author Message
wraymore
PostPosted: Thu Feb 28, 2008 11:34 am    Post subject: FIELDTYPE - XMLNSC.Folder - Resolved Reply with quote

Centurion

Joined: 16 Aug 2005
Posts: 114
Location: Burlington, NC USA

WMBv6 FP3 - Runtime

We have two XML message types being put to the same queue. We are going to transform and route these messages based upon certain information within these messages.

Sample message bodies:

Triad Message

XMLNSC = (XmlDeclaration = (Version = '1.0' Encoding = 'UTF-8')
http://www.labcorp.com/02/11/2008/V1/TriadMessage.xsd:TriadMessage = (xmlns = 'http://www.labcorp.com/02/11/2008/V1/TriadMessage.xsd'
http://www.w3.org/2000/xmlns/:triad = 'http://www.labcorp.com/02/11/2008/V1/TriadCommon.xsd'
http://www.labcorp.com/02/11/2008/V1/TriadMessage.xsd:TriadRouteInfo = (http://www.labcorp.com/02/11/2008/V1/TriadCommon.xsd:RoutingProcessId = 'LCM_PATIENT_CPR')

Triad Message Status

XMLNSC = (XmlDeclaration = (Version = '1.0' Encoding = 'UTF-8')
http://www.labcorp.com/02/11/2008/V1/TriadMessageStatus.xsd:TriadMessageStatus = (xmlns = http://www.labcorp.com/02/11/2008/V1/TriadMessageStatus.xsd'
http://www.w3.org/2000/xmlns/:triad = 'http://www.labcorp.com/02/11/2008/V1/TriadCommon.xsd'
http://www.labcorp.com/02/11/2008/V1/TriadMessageStatus.xsd:TriadRouteInfo = ( http://www.labcorp.com/02/11/2008/V1/TriadCommon.xsd:RoutingProcessId = 'CLEVELANDCLINIC_PATIENT_CPR_STATUS')


ESQL that I have written to try and determine which record I am processing

CREATE FILTER MODULE XMLMessage_MessageOrStatus
CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN

DECLARE trdmsgNS NAMESPACE 'http://www.labcorp.com/02/11/2008/V1/TriadMessage.xsd';
DECLARE trdstatmsgNS NAMESPACE 'http://www.labcorp.com/02/11/2008/V1/TriadMessageStatus.xsd';
DECLARE triadNS NAMESPACE 'http://www.labcorp.com/02/11/2008/V1/TriadCommon.xsd';

IF FIELDTYPE(Root.XMLNSC.trdmsgNS:TriadMessage) = XMLNSC.Folder THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END;

END MODULE;


I have tried several combinations of information for the FIELDTYPE(argument), but to no avail, the return is always false. I have two trace nodes wired to the filter node. True - TriadMessage; False - TriadMessageStatus.

Thanks for any help.



Last edited by wraymore on Thu Feb 28, 2008 12:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Feb 28, 2008 11:38 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Why not look at FIELDNAME of FIRSTCHILD of Root.XMLNSC?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wraymore
PostPosted: Thu Feb 28, 2008 12:17 pm    Post subject: FIELDTYPE - XMLNSC.Folder --Resolved Reply with quote

Centurion

Joined: 16 Aug 2005
Posts: 114
Location: Burlington, NC USA

Thanks Jeff for your reply and to sanu_mit for his posted reply on http://www.mqseries.net/phpBB2/viewtopic.php?t=28749&highlight=&sid=dd002ea0a59e2015537d2cb9240f7244

Here is the code that I used:

SET msgType = FIELDNAME(InputRoot.XMLNSC.(XML.Element)[1]);

Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Feb 28, 2008 2:36 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's entirely wrong to use XMLNSC with (XML.Element), and vice versa.

Hint: It's not XML, it's XMLNSC.


_________________
I am *not* the model of the modern major general.
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 » FIELDTYPE - XMLNSC.Folder - Resolved
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.