Skip to main content

developerWorks >  WebSphere  >  Forums  >  WebSphere Message Broker  >  developerWorks

Message parsing    Point your RSS reader here for a feed of the latest messages in this thread


Tags for this thread: 

     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
Permlink Replies: 3 - Pages: 1 - Last Post: Nov 11, 2009 5:00 AM Last Post By: kimbert@uk.ibm....
gsharma

Posts: 12
Registered: Sep 29, 2009 12:24:16 PM
Message parsing
Posted: Nov 09, 2009 09:50:03 AM
Click to report abuse...   Click to reply to this thread Reply
Hi,

I am just curious regarding why cant the broker validation options. The documentation says that if you select Intermediate or Complete parsing option the Complex composition cannot be resolved at the time of validation. I am just curious why is it so, and when how is it able to resolve it later in the flow ...

Regards,

  • Gaurav
kimbert@uk.ibm....

Posts: 116
Registered: Jul 10, 2006 09:44:43 AM
Re: Message parsing
Posted: Nov 10, 2009 04:26:07 AM   in response to: gsharma in response to: gsharma's post
Click to report abuse...   Click to reply to this thread Reply
I guess you are referring to this topic: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ac18870_.htm

  1. If you select a Parse Timing value of Immediate, on-demand parsing is overridden, and everything in the message is parsed and validated except, if the message domain is MRM, those complex types with a Composition of Choice or Message that cannot be resolved at the time
  2. If you select a Parse Timing value of Complete, on-demand parsing is overridden, and everything is parsed and validated. If the message domain is MRM, complex types with a Composition of Choice or Message that cannot be resolved at the time cause a validation failure.

I think you have misunderstood what this is saying. The MRM parser can resolve and validate complex types. It can even resolve choices automatically and resolve complex types with Composition="message". It cannot, however, resolve a choice which does not have a tag. The validation options are provided for those rare situations when the message flow needs to resolve the choice, but the user wants validation of the other fields in the message.
gsharma

Posts: 12
Registered: Sep 29, 2009 12:24:16 PM
Re: Message parsing
Posted: Nov 11, 2009 03:58:22 AM   in response to: kimbert@uk.ibm.com in response to: kimbert@uk.ibm.com's post
Click to report abuse...   Click to reply to this thread Reply
Hey,

Excellent guess, that is exactly where I was hovering when I came acorss this doubt. I see your point but one thing I am not getting is that, as you said in your reply

'user wants validation of the other fields in the message'

When I am specifing this option, I do it at MQInput node where the user cannot specify which field it wants to validate, though this would be perfect case if the user had asked for valiation somewhere past MQInput ( say in compute node ) ...
kimbert@uk.ibm....

Posts: 116
Registered: Jul 10, 2006 09:44:43 AM
Re: Message parsing
Posted: Nov 11, 2009 05:00:29 AM   in response to: gsharma in response to: gsharma's post
Click to report abuse...   Click to reply to this thread Reply
If the CWF parser encounters a choice, it
a) calculates the maximum length of the choice ( the length of the longest member of the choice ). Call this 'maxChoiceLength'
b) extracts 'maxChoiceLength' bytes from the input message, as a BLOB
c) creates a NameValue element in the message tree and sets its value to the extracted BLOB.

The item created in c) is an 'unresolved choice'. The ESQL/Java/PHP code can resolve that choice by referencing one of its branches. This provides the parser with the missing piece of information ( i.e. which branch it should parse ). It then replaces the NameValue element with the elements of the resolved choice branch.

That should answer your questions about the meaning of these validation options.
 Tags
Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

 

MoreLess 


Point your RSS reader here for a feed of the latest messages in all forums