Author |
Message
|
michael.da |
Posted: Fri May 12, 2006 5:05 am Post subject: validate node |
|
|
Novice
Joined: 30 Mar 2006 Posts: 13 Location: Frankfurt / Germany
|
Hi
I have problems to configure a validate node. For validation I have created a new message set from a DTD.
My configuration for the validate node is as follows:
Domain field = MRM
Check Domain = Yes
Set = test(CG2…001) //the message set ID
Check Set = yes
Type = //empty
Check Type = No
I know I need a value for “Type” but I don’t know where to get it. As Information Center dictates I have to
“entering the identifier of the message in Type. This identifier can be found in the properties of the message when you view the message in the editor. You specify the message identifier when you create the message.”
In my messageFlow, the validation node is the first instance of node which works with a MessageSet. My input node is a user-defined java node which only should read messages from files, thus during creation of the message I haven’t specified a message identifier.
I’ve made a trace output from my message, here is a clipping:
Mytrace, created 14:22 (
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 0
[…]
Regards
Michael |
|
Back to top |
|
 |
wschutz |
Posted: Fri May 12, 2006 5:53 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
In you message SET, you should have created one or more Messages. The name of the message (like "message1') is the message type. _________________ -wayne |
|
Back to top |
|
 |
michael.da |
Posted: Fri May 12, 2006 8:06 am Post subject: |
|
|
Novice
Joined: 30 Mar 2006 Posts: 13 Location: Frankfurt / Germany
|
ok wayne, I've found my message identifier. First I want to build a prototype with a simple xml message, in my case:
<?xml version="1.0"?>
<music>
<cd number="1">
<title>MQ something </title>
<tracks quantity="15" />
</cd>
</music>
With the message definition file wizard I had created a new MessageSet. According to my xml file my identifier must be music!!!?? Anyway, the validation fails. In my ExceptionList I get the error 4162, Domain, set, or type check failed. No idea what's wrong
Regards
Michael |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 15, 2006 1:18 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
In my ExceptionList I get the error 4162, Domain, set, or type check failed. No idea what's wrong |
Maybe Domain, set or type are incorrect
The obvious next step is to inspect those properties of your message. Have you put a trace node before your Check node and looked at the Properties folder of the message? |
|
Back to top |
|
 |
michael.da |
Posted: Mon May 15, 2006 1:29 am Post subject: |
|
|
Novice
Joined: 30 Mar 2006 Posts: 13 Location: Frankfurt / Germany
|
yes, I have. MessageSet and MessageType is empty (see above). This is because I get my message from a user-defined input node and this node doesn't works with a messageSet. The validation node only
"compares the structure of a message arriving on its input terminal with a message structure definition that you supply when you configure the Validate node."
Thus, I don't think that I need the values described in the message properties, but I will check this out... |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 15, 2006 1:41 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The Validate node ( Check node ) will not check that your message conforms to your DTD. If you want to do that, you need an RCD node, not a Check node. And make sure that you enable validation in the RCD node. |
|
Back to top |
|
 |
michael.da |
Posted: Mon May 15, 2006 1:50 am Post subject: |
|
|
Novice
Joined: 30 Mar 2006 Posts: 13 Location: Frankfurt / Germany
|
newbie-question: what is a RCD node? I couldn't find it in the toolkit. |
|
Back to top |
|
 |
wschutz |
Posted: Mon May 15, 2006 1:51 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
RCD = Reset Content Descriptor _________________ -wayne |
|
Back to top |
|
 |
michael.da |
Posted: Mon May 15, 2006 3:59 am Post subject: |
|
|
Novice
Joined: 30 Mar 2006 Posts: 13 Location: Frankfurt / Germany
|
thanks for the tip with the RCD node. Works fine!
with reference to -Validation node-
Obviously the validation node checks the message properties, too. If there are different values than defined in the properties of the validation node (Check Domain, Check Set, Check Type) the validation fails.
I have solved the problem with a fancy workaround. My message properties don’t have values at this attributes, so I had to fill the properties. I propagated the message to a MQoutput node and fetch it with a MQget node. In the MQget node I defined the appropriate messageSet.
Regards
Michael |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 15, 2006 4:48 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I have solved the problem with a fancy workaround. My message properties don’t have values at this attributes, so I had to fill the properties. I propagated the message to a MQoutput node and fetch it with a MQget node. In the MQget node I defined the appropriate messageSet. |
Why not just write some ESQL which changes the parser and sets the properties? |
|
Back to top |
|
 |
michael.da |
Posted: Mon May 15, 2006 5:07 am Post subject: |
|
|
Novice
Joined: 30 Mar 2006 Posts: 13 Location: Frankfurt / Germany
|
I've thought about it. At the moment I do prototyping. In my next steps I will change the messageSet to a more complex structure. With ESQL I have to change code, with a MQoutput-MQget solution I have to change the node properties. It's the same time and effort, but I was interested in MQget node  |
|
Back to top |
|
 |
|