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 » Problem in XML message parsing

Post new topic  Reply to topic
 Problem in XML message parsing « View previous topic :: View next topic » 
Author Message
abcmno123
PostPosted: Thu Aug 17, 2006 10:22 pm    Post subject: Problem in XML message parsing Reply with quote

Novice

Joined: 16 Aug 2006
Posts: 22

Hi,
I am giving a TDS message as input whose delimiter is a new line character.Hence, if I give a XML message as input then the message must be rejected because of TDS general error.This much is working fine if I give a normal XML message.

But if I input a XML message which contains MQRFH2 header then this xml message is parsed without throwing any exception.

Why is it so???
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Aug 18, 2006 12:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

More details required:
- Message broker version and CSD level
- What does the MQRFH2 header contain? Please list the Domain/MessageSet/MessageType/MessageFormat.
Back to top
View user's profile Send private message
abcmno123
PostPosted: Fri Aug 18, 2006 12:48 am    Post subject: Reply with quote

Novice

Joined: 16 Aug 2006
Posts: 22

Message broker version - 5.0, fix pack - 5
MQRFH2 header contains vesion, frmat, ecoding,codedcharsetid, flag, amevalueCCSID.

domain - MRM
essage format - TDS
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Aug 18, 2006 1:06 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
But if I input a XML message which contains MQRFH2 header then this xml message is parsed without throwing any exception.
1. Message Broker selects a parser based on the 'Domain' in the message properties folder. If the MQRFH2 header tells it to use an XML parser, then it will do so.
2. Why do you expect a parsing error when you put an XML message into your flow? If your message set is simply dividing the input into lines, it should parse an XML document without a problem.
I don't really understand what you're trying to accomplish - please explain your requirements in full.
Back to top
View user's profile Send private message
abcmno123
PostPosted: Fri Aug 18, 2006 1:26 am    Post subject: Reply with quote

Novice

Joined: 16 Aug 2006
Posts: 22

I want to send an input message in TDS format in which the delimiter is a comma. Another thing is that one single message contains many messages which are separated by new line character.

some thing like,

A1,B1,C1
A2,B2,C2

the above is how the message looks like.

and I dont want an incoming message to be in xml format i.e, I dont want the xml message to be parsed. the moment the xml message comes as input it must throw an exception and go to failure node.
Back to top
View user's profile Send private message
vinbud117
PostPosted: Fri Aug 18, 2006 1:37 am    Post subject: Reply with quote

Acolyte

Joined: 22 Jul 2005
Posts: 61

turn on the validation.... choose content n value...
Back to top
View user's profile Send private message
abcmno123
PostPosted: Fri Aug 18, 2006 1:39 am    Post subject: Reply with quote

Novice

Joined: 16 Aug 2006
Posts: 22

already done that...
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Aug 18, 2006 1:52 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

If I was doing this I would parse the message in the BLOB domain, check the first few bytes for an XML tag, and then re-parse in the MRM domain.
Back to top
View user's profile Send private message
abcmno123
PostPosted: Fri Aug 18, 2006 2:11 am    Post subject: Reply with quote

Novice

Joined: 16 Aug 2006
Posts: 22

If the message is parsed once, how do we re-parse it again... put a MQInput node again to parse it?
Back to top
View user's profile Send private message
sebastianhirt
PostPosted: Fri Aug 18, 2006 2:23 am    Post subject: Reply with quote

Yatiri

Joined: 07 Jun 2004
Posts: 620
Location: Germany

You can use a ResetContentDescriptor Node to reparse the message
Back to top
View user's profile Send private message
wschutz
PostPosted: Fri Aug 18, 2006 2:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Use the "Reset Content Descriptor" node
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
abcmno123
PostPosted: Fri Aug 18, 2006 3:47 am    Post subject: Reply with quote

Novice

Joined: 16 Aug 2006
Posts: 22

But my actual problem is that if I give a normal xml message as input then it does not parse it but if I give a xml message which has MQRFH2 header then it does not parse.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Aug 18, 2006 4:02 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Broker uses the MQRFH2 to determine how to parse a message, based on the contents of certain properties in the MQRFH2.

I'm guessing that the appearance of an MQRFH2, that includes the absences of those properties, means that Broker will still ignore the settings on the MQInput node (which are now and have always been defaults), and make it's own best guesses about how to parse the data. And since XML is self-defining, broker will automatically parse the data just fine.

Rather than screwing around with setting the MQInput node to BLOB (which disables the MQRFH2 checking) and then playing with bitstreams and substrings and etc...

Do a sanity check as your first action in your flow to find out if the first child of InputBody is what you expect it to be or not... If it's not, throw an error. Or check that InputRoot.Properties.Domain, InputRoot.Properties.MessageSet, etc. match what you're expecting.
_________________
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 » Problem in XML message parsing
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.