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 » XML Input Validation using MRM domain

Post new topic  Reply to topic
 XML Input Validation using MRM domain « View previous topic :: View next topic » 
Author Message
Qadeer_824
PostPosted: Tue Mar 25, 2008 10:51 pm    Post subject: XML Input Validation using MRM domain Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

Hi,
I have a message flow which gets an XML as input. This XML needs to be validated against an .xsd file. I have used this .xsd file to generate the message set and used MRM domain to configure the messageset and the MQInput node.

Following are the properties set:
MQInput Node:
Message Domain: MRM
Message Set: TEST_XML (IITOAQ0002001)
Message Type: Test
MessageFormat: CwXML
Validate: Content And Value
Failure Action: Exception
Parsing: On Demand
MessageSet:
Wire Format : CwXML
Runtime Parser : MRM

When i tested the flow with an invalid input, it passed through the mqinput node (maybe because parsing is set to OnDemand?). But in the next compute node, when it tired to access an attribute (inside a complex element which is mandatory), it didnt throw any error even though the complex element which is mandatory was missing in the input. Note that validation is set to Content and Value with failure action of Exception on the compute node.

I even tried changing the parse timing to Complete on mqinput node, but it happily went to the next node without an exception.
Can someone please help me out in resolving this?

Thnx in advance..

Regards,
Qadeer
Back to top
View user's profile Send private message Yahoo Messenger
AkankshA
PostPosted: Tue Mar 25, 2008 11:19 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

Parsing: Immediate instead of On Demand
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
Qadeer_824
PostPosted: Wed Mar 26, 2008 12:43 am    Post subject: no success yet! Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

Hi Akanksha,
Changed the parse timing to "Immediate" but still doesnt seem to work. It succesfully parses the input without any exception ..
The xsd defines the structure as given below:
Code:

TestSAP.mxsd
  ->Messages
    ->Test
     ->{Local Complex Type}  (Composition = choice, content validation = closed)
       ->cust_bills  (MinOccurs = 1, MaxOccurs =1)
         ->{Local Complex Type} (Composition=sequence, content validation=closed)
           -> orders (minoccurs=1, maxoccurs=1)

I tried the following input xmls'
Code:

<?xml version="1.0" encoding="UTF-8"?><Test></Test>

Code:

<?xml version="1.0" encoding="UTF-8"?><Test><cust_bills></cust_bills></Test>

but both get parsed fine.
Back to top
View user's profile Send private message Yahoo Messenger
AkankshA
PostPosted: Wed Mar 26, 2008 12:58 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

are u on latest fixes..

as few of my colllegues also faced this problem sometime back... n guess fixes resolved their problem...

let me chk wd them now
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Wed Mar 26, 2008 1:40 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Which version/fix pack are you using?

Your schema looks a little strange. Why are you using a choice with only one member? Are you quite certain that your input document is invalid according to that schema?
Back to top
View user's profile Send private message
Qadeer_824
PostPosted: Wed Mar 26, 2008 2:08 am    Post subject: Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

I'm using V6.0 of Broker with MQ V5.3.
Not sure about the fixpack level (is there any command/tool which gives these details?)

Kimbert,
This schema was generated by application team. Going further they want to extend it to have many more elements (rather messages).

Yes, atleast it looks very obvious as the mandatory element itself is missing in the input (which should certainly throw an error).
Back to top
View user's profile Send private message Yahoo Messenger
Qadeer_824
PostPosted: Wed Mar 26, 2008 2:55 am    Post subject: RESOLVED !! Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

Hello Everybody,
The issue is now resolved. After replying to the message below, i had a look at the message set. It had the XML rendering options set and as said by kimbert, the local complex element had compotion set to choice though there was single element. When i changed it to sequence, the input started failing with the expected errors..!

Anyways! Special thanx to Akanksha & Kimbert for the help.

Regards,
Qadeer
Back to top
View user's profile Send private message Yahoo Messenger
apaaar
PostPosted: Tue Apr 08, 2008 2:01 am    Post subject: Reply with quote

Newbie

Joined: 04 Feb 2008
Posts: 7

Set
Content Validation = open for complex types
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Apr 08, 2008 2:46 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

apaar said:
Quote:
Set
Content Validation = open for complex types
That's not a useful comment. For most users, it is plain wrong. If you want to contribute, take the time to make yourself clear.
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 » XML Input Validation using MRM domain
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.