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 » MQInput Node with XML Message Domain ---not validating !!!!!

Post new topic  Reply to topic Goto page 1, 2  Next
 MQInput Node with XML Message Domain ---not validating !!!!! « View previous topic :: View next topic » 
Author Message
kevin_22
PostPosted: Thu Nov 23, 2006 7:05 am    Post subject: MQInput Node with XML Message Domain ---not validating !!!!! Reply with quote

Centurion

Joined: 08 Mar 2005
Posts: 100

Hi,

I am working with MQSI 2.1. I am having MQInput Node in my flow with Message Domain = 'XML' , Validate = 'Content And Value', Failure Action = 'Exception', Timing = 'Complete'.

MQInput Node ---Out Terminal- Compute1
---Catch Terminal - Compute2
To my understanding, when i use non-xml(normal text) file in InputQ it should throw an exception and message should propage to Compute2. But the message is propagating to Compute1. Please let me know where i am going wrong.

Thanks,
Kevin


Last edited by kevin_22 on Sun Nov 26, 2006 9:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Nov 23, 2006 8:37 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You are making at least three fundamental errors:
- You are using the XML domain in a new message flow. Please use XMLNS.
- You are setting validation options when using the XML parser. Only the MRM domain supports validation.
- You think that well-formedness is the same as validation.
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Nov 23, 2006 11:09 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

kimbert wrote:
- You are using the XML domain in a new message flow. Please use XMLNS.


He is using 2.1, and does not have the XMLNS domain available to use.


Kevin_22: Do you know 2.1 is out of service now? You really should try to upgrade to V6.
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
kevin_22
PostPosted: Thu Nov 23, 2006 9:22 pm    Post subject: Reply with quote

Centurion

Joined: 08 Mar 2005
Posts: 100

Hi,

mgk, You are right i am using MQSI 2.1 as per my client requirement. I wonder is there any solution to my problem ?


Thanks,
Kevin
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Nov 24, 2006 12:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kevin_22 wrote:
mgk, You are right i am using MQSI 2.1 as per my client requirement. I wonder is there any solution to my problem ?


kimbert was right with his other 2 points (and still right about XMLNS once you get v6). Re-examine his comment.

Hint - how can you use MRM?

Second hint - think carefully about the difference between well formed XML and valid XML.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kevin_22
PostPosted: Fri Nov 24, 2006 1:12 am    Post subject: Reply with quote

Centurion

Joined: 08 Mar 2005
Posts: 100

kimbert wrote:
Quote:
You are setting validation options when using the XML parser. Only the MRM domain supports validation.
- You think that well-formedness is the same as validation.


My requirement is when the QMInput node received a non-xml message, exception should raise and message should move to catch terminal.

As kimbert said, i made MQInput node 'Validate = NONE'. but no luck.

Thanks,
kevin
Back to top
View user's profile Send private message
fazz
PostPosted: Fri Nov 24, 2006 1:16 am    Post subject: Reply with quote

Centurion

Joined: 20 Feb 2004
Posts: 144
Location: England

You need to model your XML message in a message set, you can then use this message set to check your input message.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Nov 24, 2006 1:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kevin_22 wrote:
As kimbert said, i made MQInput node 'Validate = NONE'. but no luck.


I don't think that's quite what he meant.

I do think you're still confusing a well-formed XML document with a valid one. They're not the same. The first can be identified with the XML parser you're using, the second can only be identified by the MRM parser.

As one also condemed to use 2.1 I can confirm what you're trying to do does work. Though I yearn for the upgrade.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Nov 24, 2006 1:36 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

kevin22 : Apologies for the comment about XMLNS - I was thinking that it was introduced in v2.1

Not sure why the badly-formed message is not going to the Catch terminal. Have you wired up the failure terminal as well? I suggest that you take a user trace of the parse and see whether any parsing exceptions are being thrown.

FYI, validation refers to checking an XML message against a schema/DTD. What you are describing is well-formedness checking ( i.e. checking that the message is valid XML ). The XML domain does not do validation. You need the MRM domain and ( a message set ) for that.
Back to top
View user's profile Send private message
kevin_22
PostPosted: Fri Nov 24, 2006 3:29 am    Post subject: Reply with quote

Centurion

Joined: 08 Mar 2005
Posts: 100

Kimbert,

Thanks for your valuable response.
I want to check the message is XML or not( is well formedness or not).I am not connecting Failure terminal. It seems that, broker stats parsing the message only when we reference the element in the XML message eg: InputRoot.XML.Root.

When the compute1(connected to out terminal) having OutputRoot = InputRoot. It doesn't parses and no exception thrown.

When compute1 is having ESQL like InputRoot.XML, broker is parsing the message and throwing the exception and the message is reaching to catch terminal. I want this parsing to be done at MQInput Node itself so that message reaches to catch terminal.

fazz wrote:
Quote:
You need to model your XML message in a message set, you can then use this message set to check your input message.

If i am checking the Incomming XML message with tag names then i could use MRM domain by creating a message set. But i am just checking for well formedness(valid XML or not).

Please let me know whether i could check incomming message is XML or not with out creating message set.

Thanks,
Kevin.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Nov 24, 2006 3:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Someone stop me if I'm talking rubbish, but AFAIK the 2.1 parser is on demand - it only attempts to parse the message if it needs to find something. Hence in your example the message is being copied in it's entireity, there's no requirement to parse and so no error is thrown.

If I was you (and remember I'm not) I'd code the compute node to look for the first tag; something like:

Code:
 SET Something = InputRoot.XML.(XML.Element)[1];


(Code fragment from memory & utterly untested!!)

This will cause a parse and anything not well formed will throw an exception.

Or you could look for the XML declaration, or the encoding, etc, etc)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kevin_22
PostPosted: Fri Nov 24, 2006 4:00 am    Post subject: Reply with quote

Centurion

Joined: 08 Mar 2005
Posts: 100

Victor,

Thats right. i am surviving now by keeping InputRoot.XML...in compute1 to raise exception while parsing.

Thanks to all for exploring this.
Kevin
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Nov 24, 2006 5:12 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

It's not a bad solution, and should provide more than "survival"!

At least you've got it working and well done you. Please add "[SOLVED]" to the title for the benefit of future generations.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 24, 2006 7:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Don't know if 2.1 has the feature... but in 6.0 you have the alternative of telling the input node to do a full parse and not do parsing on demand. This should give you the requested behavior...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Fri Nov 24, 2006 8:35 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

No it doesn't - that option was tied in with the validation properties until v6.0.
I think in this case the requirement is simply to parse the first element ( if possible) in order to see whether the document looks like XML. So maybe the current solution is pretty good anyway.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MQInput Node with XML Message Domain ---not validating !!!!!
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.