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 » How to identify Msg format?

Post new topic  Reply to topic
 How to identify Msg format? « View previous topic :: View next topic » 
Author Message
dev
PostPosted: Tue Dec 10, 2002 8:38 am    Post subject: How to identify Msg format? Reply with quote

Apprentice

Joined: 11 Oct 2001
Posts: 30

I have a scenerio where a filter node can receive either BLOB or XML format, it route on the basis of format(BLOB or XML). How can i identify that what format is it for incomming message?

Thanks in advance
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Dec 10, 2002 9:20 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Since you have control over your message flow, I'd suggest that you add an ESQL statement to set domain name into some field in MQMD header,

In your XML path,
SET OutputRoot.MQMD.ApplIdentityData = 'XML';

In your BLOB path,
SET OutputRoot.MQMD.ApplIdentityData = 'BLOB';

Now, in your Filter node you could check for this field to know whether you are processing XML or BLOB message before routing it to appropriate terminal.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
dev
PostPosted: Tue Dec 10, 2002 9:28 am    Post subject: How to identify Msg format? Reply with quote

Apprentice

Joined: 11 Oct 2001
Posts: 30

Kirani,
I do not have conrol to set MQMD since data is comming from client side in either format, however we are already using AppIdentityData for another parameter which is common to both format, any other lead will be appreciated?

Thanks
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Dec 10, 2002 9:55 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

What do you mean by BLOB data here? Is it in MRM-CWF format or is it simply binary data (Hex chars)?

Alternate solution would be to use some other field in MQMD header (MessageType, ApplOriginData, ...) to identify Message Type. If this is not possible then there is one more way of doing this in a message flow,

Read your input message as BLOB using your MQInput node, In a filter node check for '<' char in the beginning of the message, all XML messages start with < char
Code:

IF (SUBSTRING(CAST(InputRoot."BLOB"."BLOB" AS CHAR CCSID Root.Properties.CodedCharSetId ENCODING Root.Properties.Encoding) FROM 1 FOR 1) = '<') THEN
-- Your message is XML
ELSE
-- your message is BLOB or ...
END IF;


I hope this helps.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to identify Msg format?
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.