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 » MRM - Mandatory Elements

Post new topic  Reply to topic Goto page 1, 2  Next
 MRM - Mandatory Elements « View previous topic :: View next topic » 
Author Message
goldym
PostPosted: Thu Jul 14, 2005 11:25 am    Post subject: MRM - Mandatory Elements Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

I have a two part question regarding the MRM.
1. I generated a messageSet from a schema. I edited the messageSet by setting the Root Tag to Trade (which is my root element) Also i have a message called Trade which is what I want to use in the MRM domain.
I just used a simple SET statement
SET Environment.Variables.ProductName = InputRoot.MRM.Trade.productName;

This failedstating no body in document. However when I removed the Root Tag setting to Trade and just left it blank I changed my SET statement to

SET Environment.Variables.ProductName = InputRoot.MRM.productName;
This seemed to work. Maybe I just am unclear of the MRM, but should Root Tag or Message be replaced by 'MRM'?

2. Is there anyway to capture DTD validation errors when you use the MRM Domain? Besides going through and doing a check on all of the mandatory elements?
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Jul 14, 2005 3:12 pm    Post subject: Reply with quote

Jedi Knight

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

2. Doesn't Exception list give you more detail about the error?
_________________
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
kimbert
PostPosted: Fri Jul 15, 2005 1:34 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

1. The behaviour which you saw is the intended behaviour. The 'Root Tag Name' property should be used only if the root tag of your message is enclosed within another tag which you don't want to see in your parsed message tree.
2. Switch on validation in the MQInput or Compute node.
Back to top
View user's profile Send private message
goldym
PostPosted: Fri Jul 15, 2005 8:16 am    Post subject: Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

[quote="kimbert"]1. The behaviour which you saw is the intended behaviour. The 'Root Tag Name' property should be used only if the root tag of your message is enclosed within [b]another[/b] tag which you don't want to see in your parsed message tree.
2. Switch on validation in the MQInput or Compute node.[/quote]

Kimbert,

The problem I have is that I have several XML files coming in on the same queue so I have to have the domain set to XML. And I've written all my code to use the XML domain. Do you think its too confusing to have the message come in as XML, then route it to another queue to set to use MRM domain, validate then use the Reset Content Node to use the XML domain?
Back to top
View user's profile Send private message
Maverik
PostPosted: Fri Jul 15, 2005 10:10 am    Post subject: Reply with quote

Apprentice

Joined: 14 Jun 2005
Posts: 27

Ur question about whether Root tag should be replaced by MRM.
Ans= Yes. The message has Properties,MQMD and MRM which in turn is the name of the Root tag.So u dont need to make reference to it.

About your XML domain usage, I dont see why you cant achieve whatever ur trying with domain as XML.Maybe if you can tell us what ur message set fields are and what ur trying to do.....
Back to top
View user's profile Send private message
kimbert
PostPosted: Sun Jul 17, 2005 11:57 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
The problem I have is that I have several XML files coming in on the same queue so I have to have the domain set to XML. And I've written all my code to use the XML domain. Do you think its too confusing to have the message come in as XML, then route it to another queue to set to use MRM domain, validate then use the Reset Content Node to use the XML domain?

It depends what your requirements are. It would certainly be simpler to use the MRM domain throughout. You can handle different MRM messages on the same queue easily enough. The MRM XML parser will select the correct message definition based on the root tag of the incoming message. (specifically, it will look up the message definition whose XML Name (not Root Tag Name) is set to the incoming root tag).
Back to top
View user's profile Send private message
goldym
PostPosted: Mon Jul 18, 2005 4:47 am    Post subject: Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

[quote="kimbert"][quote]The problem I have is that I have several XML files coming in on the same queue so I have to have the domain set to XML. And I've written all my code to use the XML domain. Do you think its too confusing to have the message come in as XML, then route it to another queue to set to use MRM domain, validate then use the Reset Content Node to use the XML domain?[/quote]
It depends what your requirements are. It would certainly be [i]simpler[/i] to use the MRM domain throughout. You can handle different MRM messages on the same queue easily enough. The MRM XML parser will select the correct message definition based on the root tag of the incoming message. (specifically, it will look up the message definition whose XML Name ([b]not Root Tag Name[/b]) is set to the incoming root tag).[/quote]

Thanks I can't use the MRM domain, although I agree that it would be much simplier b/c i have one XML message that I was unable to create a .xsd for.
Back to top
View user's profile Send private message
goldym
PostPosted: Mon Jul 18, 2005 5:00 am    Post subject: Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

Does anyone know. IF I imported a .xsd file and created a messageSet and generated a message definition file. Shouldn't a missing mandatory element cause an exception. I have my compute node set to Validate (Content and Value) Failure Action (Exception). It seems to continue on processing someone normally?
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jul 18, 2005 5:44 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I think I know what your problem is. Your entire message is self-defining (i.e. not matched against the message definition).
Check that the Root Tag Name property in your message set is empty
( and check that you have re-deployed after clearing it )
Check that the XML Name property of the message is the same as the root tag of the incoming message.
Check that all types and groups in your message definition have 'Content Validation' set to 'Closed' and the 'Mixed Content' box cleared.
Back to top
View user's profile Send private message
goldym
PostPosted: Mon Jul 18, 2005 6:34 am    Post subject: Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

[quote="kimbert"]I think I know what your problem is. Your entire message is self-defining (i.e. not matched against the message definition).
Check that the Root Tag Name property in your message set is empty
( and check that you have re-deployed after clearing it )
Check that the XML Name property of the message is the same as the root tag of the incoming message.
Check that all types and groups in your message definition have 'Content Validation' set to 'Closed' and the 'Mixed Content' box cleared.[/quote]

Thanks for your help!

I'm not sure where to set these two:
1. Check that the XML Name property of the message is the same as the root tag of the incoming message.


2. Check that all types and groups in your message definition have 'Content Validation' set to 'Closed' and the 'Mixed Content' box cleared.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jul 19, 2005 12:30 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Switch to the Broker Application Development perspective.
Open your message set
The message set editor has four panes
- Navigator at top left
- Outline view at bottom left
- Properties view at top right
- Tasks/problems view at bottom right

At the bottom of the Properties pane there are two tabs - Overview and Properties. The default is 'Overview', but 'Properties' is by far the most useful. It shows the logical and physical properties for whatever is highlighted in the Outline ( bottom left) view.

So...
Open the mxsd file containing the message
Select the message in the Outline view
In the Properties pane (top right) select the 'Properties' tab
In the tree view at the left of the Properties pane, select the 'Message' node under the name of your XML physical format.
You should now see the property 'XML Name'. Check that it is the same as the root tag of your incoming XML message.

In the Outline view, select a complex type or group
In the tree view at the left of the Properties pane, select 'Complex Type' under 'Logical Properties'. You should see properties called 'Content Validation' and 'Mixed'. Check that they are set as described.
Back to top
View user's profile Send private message
goldym
PostPosted: Tue Jul 19, 2005 5:40 am    Post subject: Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

I made both of these changes and my message still isn't being validated. Can you think of anything else that needs to be checked?
Back to top
View user's profile Send private message
goldym
PostPosted: Wed Jul 20, 2005 8:44 am    Post subject: Reply with quote

Centurion

Joined: 24 Jun 2005
Posts: 116

The problem is that it doesn't seem anyway to force validation when your input domain is set to XML unless you are outputing the message to a queue. However In my case I was writing to a database.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jul 20, 2005 9:03 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I don't think you can validate anything other than "well-formedness" when using the XML domain. The XMLNS domain may give a little more.

But MRM-XML will let you validate everything (that's currently supported, that is )
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jul 21, 2005 12:24 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Jeff is correct - the XML and XMLNS domains do not support validation against the model. But from your previous post, I thought you were switching to the MRM domain in order to get the message validated:
Quote:
Do you think its too confusing to have the message come in as XML, then route it to another queue to set to use MRM domain, validate then use the Reset Content Node to use the XML domain?

If you really do need validation, the answer is to parse your messages using the MRM domain.
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 » MRM - Mandatory Elements
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.