Author |
Message
|
youssef |
Posted: Tue Sep 26, 2006 1:28 am Post subject: Validation is not working in MQInput node |
|
|
Novice
Joined: 09 Sep 2006 Posts: 12
|
When I set validation on this node to Content or Content and Value, the flow works just as if there was no validation at all. I have tried even more different Failure Action without any effect. Any ideas ? _________________ Regards,
Youssef |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Sep 26, 2006 3:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Make sure your parser is MRM and use a message set than try validation again.... I don't believe that XMLNS validates...
As well you might need to set the parse timing to immediate and full.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Tue Sep 26, 2006 5:25 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
the flow works just as if there was no validation at all |
Lots more detail please. Which domain are you using? Which topics have you referred to in the docs? What else have you tried? Which version of the product are you using?
fjb_saper wrote
Quote: |
I don't believe that XMLNS validates |
Correct. Validation is only available in the MRM domain. |
|
Back to top |
|
 |
youssef |
Posted: Wed Sep 27, 2006 12:29 am Post subject: |
|
|
Novice
Joined: 09 Sep 2006 Posts: 12
|
My domain is MRM, I have created a simple message set definition and tested the flow with invalid xml request. I am using version 6 of MQ,MB and toolkit.
No fix packs are installed yet. Could this be the problem? _________________ Regards,
Youssef |
|
Back to top |
|
 |
jbanoop |
Posted: Wed Sep 27, 2006 1:05 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
try the same with your debugger on. It should in my experience show a parseNext error but still come out of the out termial.
Change the GeneralMessageOptions to immediate and redeploy. Next time you run it with invalid XML it should throw an error and move on the failure path.
Let us know how it went.
Regards,
Anoop |
|
Back to top |
|
 |
kimbert |
Posted: Wed Sep 27, 2006 2:10 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Change the GeneralMessageOptions to immediate |
To make that completely clear, you need to set Parse Timing to 'Immediate' on the General Message Options page of the MQInput node. If your message flow is trivial (i.e. it does not access any fields in the message ) then no parsing will occur, and no validation will occur either.
Please note: this advice is for testing out the MRM validation. Don't leave Parse Timing set to 'Immediate' in your real message flow, unless you really need it. |
|
Back to top |
|
 |
youssef |
Posted: Wed Sep 27, 2006 2:25 am Post subject: |
|
|
Novice
Joined: 09 Sep 2006 Posts: 12
|
Thank you guys, it works fine.
About kimbert comment on not leaving parsing immdeiate in a real message flow, we are actually palning to do the following:
(1) Use the validation on MQInput node and hence set parsing to immdeiate.
(2) On the integration env. we will leave the validation ON so that clients will know that they are not sending correct xmls (if any)
(3) Later on production env., we will switch the validation to OFF thru the property on the BAR files in all MQInput nodes.
What do you think of this approach _________________ Regards,
Youssef |
|
Back to top |
|
 |
jbanoop |
Posted: Wed Sep 27, 2006 2:55 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
But in case you need to validate if in production also the client is sending the correct XML format you are expecting what would you do ?
Kimbert, if the requirement is to first identify if input adheres to a particular structure and only then go ahead with further processing, then shouldnt we leave validation to immidiate ? or is there another better way to do it ?
How can we be certain for sure that the client(s) who ever is using the MB service is going to be sending the correct format all the time..
Regards,
Anoop |
|
Back to top |
|
 |
kimbert |
Posted: Wed Sep 27, 2006 3:14 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
|