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 » Validating XML on Output

Post new topic  Reply to topic
 Validating XML on Output « View previous topic :: View next topic » 
Author Message
mverh
PostPosted: Fri Jan 30, 2004 7:47 am    Post subject: Validating XML on Output Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

We are running WMQI V2.1 CSD04. We have a flow which xfroms a cobol data stream to xml. We have a pic x of field that sometimes contains invalid characters i.e. x'00'. I am trying to figure out a way to capture this and throw an exception since I don't want the xml sent because it is possible validating xml parsers will error out.

On the validation tab of the last compute node the message flows through I set the Validation option to "Content and Value" and the Failure Action to "Exception" but this doesn't cause the flow to throw an exception when there is an embedded null.

Does anyone have a way to prevent the broke from producing invalid xml and throwing an exception when it does encounter invalid xml? Note the interesting thing is if I send in an xml message to the broker and embed an invalid character the broker throws an exception.

Thanks.
_________________
Marc Verhiel
IBM Canada Ltd.
Back to top
View user's profile Send private message
mverh
PostPosted: Fri Jan 30, 2004 8:25 am    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

It just dawned on me that the validation feature will only apply to the messages in the MRM domain and since I'm in the XML domain I can't utilize this feature. Still would like to hear from anyone who has figured a way to validate output xml when in the xml domain...
_________________
Marc Verhiel
IBM Canada Ltd.
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Fri Jan 30, 2004 8:57 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

Marc,
wasn't this possible with the import of a DTD into the MRM.
This way you can validate XML using the MRM.

Never tried it myself though

Michael
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Michael Dag
PostPosted: Sat Jan 31, 2004 4:02 pm    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

Ok gave it a shot, picked up a DTD imported into MRM created a message in the MRM with the top level element of the DTD, it now becomes visible in the output message panel of the compute node, selected and map some fields.

If I turn on validating it keeps throwing exceptions (as I didn't provide enough fields on the incoming NEON format) when I turn validation to none, it just sends the XML with the elements that are there to the output node and creates the message.

Michael
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mverh
PostPosted: Sat Jan 31, 2004 10:15 pm    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

Michael, thanks for the update...unfortunately we don't have DTD's but rather XSD's so it looks like V5 will be what we will need to move to in order to get this validation. I have a V5 dev box so I think I'll try it out there and see if I can get it to work.
_________________
Marc Verhiel
IBM Canada Ltd.
Back to top
View user's profile Send private message
kirani
PostPosted: Sat Jan 31, 2004 11:14 pm    Post subject: Reply with quote

Jedi Knight

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

Even with WMQI 2.1 you can import XML Schema into a message set. I think you need to be at CSD3 level to do this.
_________________
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
mverh
PostPosted: Sun Feb 01, 2004 11:01 am    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

Great! I try it on the V2.1 box then since we are at CSD04...
_________________
Marc Verhiel
IBM Canada Ltd.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Feb 03, 2004 2:11 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

MRM message validation works from the logical model - it does not have any XML-specific rules, so it will not automatically catch an invalid XML character. MRM validation is for validating against
a) the content of a structure (all required field present etc)
b) the value of a field ( >100, <150, minLength=2 etc)

If you need to check the contents of a field before you assign it to an output field, you'll probably need some ESQL.
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 » Validating XML on Output
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.