Author |
Message
|
wmqiadmin |
Posted: Tue Oct 03, 2006 9:23 am Post subject: TDS Blank Element not created in the message set |
|
|
 Disciple
Joined: 19 Jun 2005 Posts: 163 Location: epping UK
|
Hi All,
Working with TDS input message and XML output message.
I am working with Broker V6, MQ V6 win., I have created the message set in TDS format with
Complex type--> composition=unorderset, content validation=closed,
TDS physical type --->Data elements seperation= all elements delimited, delimiter=|,
All other values = default.
When i parse my message it get parse properly, only problem is if i put some empty tags (||name|||Address||) message set skips the empty elements and doesn't create the elements in the tree, it creates only the elements with values, how can i get the empty elements tags so that i can create my XML message.
Can any one please help me.
Thanks
wmqiadmin. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 03, 2006 9:25 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Read about NULL handling with TDS and XML.
Consider using the VALUE clause on your SET statement. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wmqiadmin |
Posted: Tue Oct 03, 2006 9:48 am Post subject: |
|
|
 Disciple
Joined: 19 Jun 2005 Posts: 163 Location: epping UK
|
Thanks jefflowrey,
I tried searching it in Help guide, it didn't help.
I tried it with complex type --> composition =OrderedSet, its seems its working but will post the final solution after testing.
Thanks
wmqiadmin |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 03, 2006 10:41 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
kimbert |
Posted: Wed Oct 04, 2006 12:21 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
composition=unorderset |
Why would you ever set composition to 'unorderedset' if you are dealing with a delimited structure? How could the fields ever be 'unordered'?
This is nothing to do with the 'missing elements' question - I'm just really interested to know why you selected that option. |
|
Back to top |
|
 |
wmqiadmin |
Posted: Thu Oct 05, 2006 6:45 am Post subject: |
|
|
 Disciple
Joined: 19 Jun 2005 Posts: 163 Location: epping UK
|
Hi kimbert,
I was just following the lab instructions from the WMQI basic training guide, I tried "orderedSet" instead of "UnorderedSet" and now its working.
Will this setting will have any implications in parsing the message? pls guide me....
Thanks
wmqiadmin |
|
Back to top |
|
 |
kimbert |
Posted: Thu Oct 05, 2006 11:12 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
WMQI basic training guide |
That's surprising. Not sure why they would advise 'unorderedSet' for a delimited structure unless the contents of the message tree are in the wrong order at the point when it is serialized.
Quote: |
I tried "orderedSet" instead of "UnorderedSet" and now its working |
You are on v6, so you should use Sequence rather than OrderedSet ( because it's a standard XML Schema setting ). You won't fix the 'missing fields' problem just by changing the composition, though. Are you sure nothing else has changed?
Quote: |
Will this setting will have any implications in parsing the message? |
No. The MRM TDS parser is driven very strongly by Data Element Separation, but not Composition. The fields in your 'All Elements Delimited' structure must be ordered, even if Composition = UnorderedSet.
Similarly, in a 'Tagged Delimited' structure, the tagged fields can arrive in any order even if Composition = Sequence/OrderedSet.
So what's Composition for? When validation is enabled, it determines whether out-of-order structure members cause an exception. |
|
Back to top |
|
 |
wmqiadmin |
Posted: Thu Oct 05, 2006 11:44 am Post subject: |
|
|
 Disciple
Joined: 19 Jun 2005 Posts: 163 Location: epping UK
|
kimbert wrote: |
You are on v6, so you should use Sequence rather than OrderedSet ( because it's a standard XML Schema setting ). You won't fix the 'missing fields' problem just by changing the composition, though. Are you sure nothing else has changed? |
Yes, nothing has changed except the unordered set to orderedset.
Quote: |
So what's Composition for? When validation is enabled, it determines whether out-of-order structure members cause an exception. |
sorry didn't get this... |
|
Back to top |
|
 |
kimbert |
Posted: Fri Oct 06, 2006 2:37 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Create a message definition which is a sequence of a,b,c.
Create a message flow to parse the message, and enable validation on the input node.
<message><a/><b/><b/></message> will be OK
<message><c/><b/><a/></message> will fail with a validation error
Change the Composition to UnorderedSet and try again.
<message><a/><b/><b/></message> will be OK
<message><c/><b/><a/></message> will also be OK. |
|
Back to top |
|
 |
|