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 against external xml schema

Post new topic  Reply to topic Goto page Previous  1, 2
 Validating XML against external xml schema « View previous topic :: View next topic » 
Author Message
martinrydman
PostPosted: Wed Apr 06, 2005 12:39 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Hi,

In the MQInput node there is a Timing parameter that can be set to Immediate. Is there a similar parameter to the PARSE clause?

If not, you could force validation by climbing the entire tree and copy it to Environment. My understanding is that validation works 'on demand' (it's an IBM product, after all ) i.e. it's only when you actually access a field that it gets validated.

/Martin
Back to top
View user's profile Send private message
JLRowe
PostPosted: Wed Apr 06, 2005 2:01 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

This is the code I used to force validation of the message tree:

Code:
   CREATE PROCEDURE WalkValidate(IN Input REFERENCE) BEGIN
      DECLARE Ref REFERENCE TO Input;
      -- Get the value of this field first
      IF Ref IS NULL THEN
      END IF;
      -- Walk through the first child
      MOVE Ref FIRSTCHILD;
      IF LASTMOVE(Ref) THEN
         CALL WalkValidate(Ref);
      END IF;
      -- Walk through the next sibling
      MOVE Input TO Ref;
      MOVE Ref NEXTSIBLING;
      IF LASTMOVE(Ref) THEN
         CALL WalkValidate(Ref);
      END IF;
   END;
Back to top
View user's profile Send private message Send e-mail
martinrydman
PostPosted: Wed Apr 06, 2005 4:00 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

OK, so the IF Ref IS NULL accesses the field and thus validates it. No need for Environment then...

/Martin
Back to top
View user's profile Send private message
sri
PostPosted: Wed Apr 06, 2005 5:34 am    Post subject: Reply with quote

Apprentice

Joined: 14 Mar 2004
Posts: 32
Location: Chennai - India

hi

thanks for ur help, it works with the following statement

CREATE LASTCHILD OF OutputRoot DOMAIN('MRM') PARSE(InMsgBlob SET MsgSetChr OPTIONS BITOR(ValidateValue, ValidateContent, ValidateImmediate, ValidateException));

The only clause that I missed earliear was 'ValidateImmediate'. As per document, this is the default option that will be used, but I think, it does not happen.

Now I included this 'ValidateImmediate', it is working fine. The flow raises exception at this stage itself (immediately) for invalid XML.

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Validating XML against external xml schema
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.