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 » Capturing original message following schema validation

Post new topic  Reply to topic
 Capturing original message following schema validation « View previous topic :: View next topic » 
Author Message
cklink
PostPosted: Thu Nov 18, 2004 7:46 pm    Post subject: Capturing original message following schema validation Reply with quote

Newbie

Joined: 08 Sep 2004
Posts: 3

Hi all,

I'm currently developing some message flows using WBIMB 5.0.3. I have a requirement to perform schema validation of the message placed on a queue, and if there is a validation failure to append some additional error information to the original message and place it on a separate queue.

I have successfully created the message definition in the MRM domain, and am able to perform the schema validation by setting the MQInput node properties. I then can capture the ExceptionList constructed, but I can't find any way to capture the contents of the original message (presumably because the invalid content could not be parsed successfully).

Does anyone have any suggestions as to how I can capture both the original message and the ExceptionList, so that I can construct a modified version of the original message with appended information regarding the validation failure?

Many thanks.
Back to top
View user's profile Send private message
JT
PostPosted: Thu Nov 18, 2004 8:45 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Just thinking out loud:
  1. Set the message domain of the MQInput node to BLOB.
  2. Connect the out terminal of the MQInput node to a ResetContentDescriptor node.
  3. Convert the message domain from BLOB to MRM.
  4. Connect the failure terminal of the RCD node to a Compute node.
  5. When a parsing exception occurs, that Compute node now has the input message (as a BLOB) and a Parser ExceptionList.
  6. Cast the input message into a string and append the desired elements from the ExceptionList tree.
An alternative is to replace steps 2, 3 & 4 with the following:
  • Connect the out terminal of the MQInput node to a Compute node.
  • Convert the message domain from BLOB to MRM using the CREATE LASTCHILD statement with the PARSER parameter.
  • Connect the failure terminal of the Compute node to another Compute node.
....or maybe some derivative of the above.
Back to top
View user's profile Send private message
cklink
PostPosted: Thu Nov 18, 2004 9:14 pm    Post subject: Reply with quote

Newbie

Joined: 08 Sep 2004
Posts: 3

Thanks for the response JT.

I have tried to use the ResetContentDescriptor node, but I haven't been able to configure this such that it constructs an ExceptionList and throws an exception when it observes a schema validation error.

If you can advise how to do this, then I'd be happy to try this out.

Thanks.
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Nov 18, 2004 11:45 pm    Post subject: Reply with quote

Jedi Knight

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

You cannot use RCD node to do this. It will not validate your message against schema. It only rests your domain/wireformat.

Follow the second suggestion from JT. Please make sure that you set Validation option in your compute node.
_________________
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
Ramphart
PostPosted: Wed Nov 24, 2004 3:14 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

I've done this using a trace node in V2.1

Check this link:
http://www.mqseries.net/phpBB2/viewtopic.php?t=18929
_________________
Applications Architect
Back to top
View user's profile Send private message
cklink
PostPosted: Mon Jan 10, 2005 9:26 pm    Post subject: Reply with quote

Newbie

Joined: 08 Sep 2004
Posts: 3

Because of bugs with the version I am currently required to use, I couldn't use the CREATE LASTCHILD with PARSE parameter as suggested - although I suspect this is the best approach if it works in your environment.

In the end, I got this to work by:

(a) Disabling validation on the MQInput node
(b) Storing the incoming message in Environment
(c) Defining a compute node with validation specified
(d) Writing the output message from the compute node to an MQOutput node to force the validation to occur
(e) Expiring the output message to avoid any resource issue

This isn't as elegant a solution as I would have liked, but it does at least work!

Thanks for the pointers.
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 » Capturing original message following schema validation
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.