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 » XSD->MRM & Validation question

Post new topic  Reply to topic
 XSD->MRM & Validation question « View previous topic :: View next topic » 
Author Message
smdavies99
PostPosted: Wed Mar 22, 2006 3:45 am    Post subject: XSD->MRM & Validation question Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

I have a situation which is puzzling.
- The flow is sent messages in XML format.
- The Message is formatted in the sending application to an XSD
- I imported the XSD into WBI V5.0.6 and created a message set
- The flow uses a RCD node to refomat the message from BLOB to MRM XML

All is ok until the testers start throwing messages at it.
They mess around with the XML and moved one field up(nearer the root) a level and it still got parsed ok.
After the RCD is a Compute node where I do some data checking an the Validation Property is set to "Content & Value"
The XML Field which has been moved is defined in the Message Set with a MinOccurs =1 & MaxOccurs=1

Are there any obvious reasons why the message is not rejected.
Here is an example of the good XML
Code:

<Message_Body>
 <Parts_List>
   <Date>2006-03-21</Date>
   <Version>2</Version>
   <Item>
     <PartNo>232344323</PartNo>
   </Item>
  </Parts_List>
</Message_Body>

Here is the XML after the field was moved.
Code:

<Message_Body>
 <Date>2006-03-21</Date>
 <Parts_List>
   <Version>2</Version>
   <Item>
     <PartNo>232344323</PartNo>
   </Item>
  </Parts_List>
</Message_Body>

I'm probably missing something simple but at the moment its not obvious to me
/Stephen
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Mar 22, 2006 4:05 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Your messages are being parsed OK, but they are not being matched against the message definition in the message set. The entire message is self-defining. Sort that out, and I guarantee that the errors will be trapped.

Quote:
Are there any obvious reasons why the message is not rejected
Not yet, because I don't know exactly what your message set looks like However, as I've said many time on this forum, there are quite a few ways to accidentally avoid validating your XML message.
- The most common is to leave the message set property 'Root Tag Name' set to its default 'MRM'. This field should be empty.
- Another popular approach is to get the namespace wrong
- You might also like to check that none of your complex types are defined as having mixed content.

Let me know if you still have problems.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Wed Mar 22, 2006 4:06 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi smdavies99,

Got this from the infocenter.
Quote:
Validating messages

The broker provides validation based on the message dictionaries for predefined messages. Validation, therefore, applies only to messages that you have modeled and defined to the MRM domain.

The broker does not provide any validation for self-defining messages. You can not validate messages directly against an XML DTD or XML Schema. Instead you should create the equivalent model in the MRM domain by importing your XML DTD or XML Schema using the Message Brokers Toolkit

So are u working with MRM...

Also try making the Parsing options as immediate...could work.

Regards.
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Wed Mar 22, 2006 5:09 am    Post subject: A partial solution Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Thanks for the suggestions
The Message Set RootTag is already NULL
I did find a solution that forces a parse in
http://www.mqseries.net/phpBB2/viewtopic.php?t=26477

This does work but naturally slows the whole thing down. If there is another way then I'm willing to have a look

/Stephen
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Wed Mar 22, 2006 5:14 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi smdavies99,

The other post also spoke of parse timing...did u make it immediate and try...i was hoping that would work...

Regards.
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Wed Mar 22, 2006 9:08 am    Post subject: re Parse timing Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

re:

Quote:

The other post also spoke of parse timing...did u make it immediate and try...i was hoping that would work...

I'm not overly sure where to set it up. I'm not setting the message type etc at the MQInput Node but in the RDC node

/Stephen
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Wed Mar 22, 2006 7:39 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi smdavies99,

I have moved to MB v6.0 and hence i'm not sure if the RCD in v5 has the Parse settings available

If it does, i feel it should work just as it does in the MQInput Node....

Regards.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu Mar 23, 2006 1:54 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I thought you had found a solution...
Quote:
This does work but naturally slows the whole thing down.

Or was that just a test flow?
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 » XSD->MRM & Validation question
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.