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 » TDS Help please!

Post new topic  Reply to topic
 TDS Help please! « View previous topic :: View next topic » 
Author Message
TonyD
PostPosted: Tue Nov 08, 2005 11:56 pm    Post subject: TDS Help please! Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

We have an internally designed message structure that looks like:

Code:

<BUSMSG>
<AAA>11:222:::333:4</AAA>
<BBB>:::555</BBB>
<AAA>66:777</AAA>
<GRP>
<BBB>88888::99999</BBB>
<CCC>111:222</CCC>
<AAA>33::::44</AAA>
</GRP>
</BUSMSG>


There are XML tags, which may have attributes, which contain ':' delimited data. The XML tags, and there are many, can appear in any sequence, and as shown in the example, can be grouped inside a <GRP> tag.

Our current solution involves processing the <> tags as an XML message and then extracting each of the colon-delimited strings and TDS-parsing them as if they were separate messages. It works OK but I have been trying to work out whether it is possible to parse the entire message as TDS. So far I have been unsuccessful in my attempts to specify the TDS properties for the XML-like tags.
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Nov 09, 2005 4:34 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm sorry to say that is a horrible data design. It would be so much better to put each individual piece of data in it's own tag - it is probably a false economy to "save characters" by using fewer tags.

I don't think you can do anything other than mix using substring and position.

You might be able to do stuff with multi-part messages... but you'll have to go back to the manuals and see, as I don't know for sure if it can be done or how to do this.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Nov 09, 2005 4:53 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
So far I have been unsuccessful in my attempts to specify the TDS properties for the XML-like tags

You could try this:
- Create a global element to represent each tag
- On each global element, set the 'Tag' property to '<AAA>' (or whatever)
- On the complex type for each global element, set the Group Terminator to </AAA> ( or whatever ).
- For the outermost tag, do the same, and also set the Data Element Separation on its complex type to 'Tagged Delimited'.

The above technique assumes that the incoming XML is organised as lines of text, one tag per line, no blank lines. If these conditions are not met, it may still be possible to do what you want, but it might not be worth the effort.
Back to top
View user's profile Send private message
TonyD
PostPosted: Wed Nov 09, 2005 4:05 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

Quote:

....that is a horrible data design...


Agreed!

Quote:

You could try this:
- Create a global element to represent each tag
- On each global element, set the 'Tag' property to '<AAA>' (or whatever)
- On the complex type for each global element, set the Group Terminator to </AAA> ( or whatever ).
- For the outermost tag, do the same, and also set the Data Element Separation on its complex type to 'Tagged Delimited'.


I had done almost exactly the above, but had set 'Repeating Element Delimiter' in the Global Element to </AAA> (rather than in the Complex Type). I still have not worked out, from the mnemonic-related documentation, how to specify these tags in 'Group Indicator' and 'Group Terminator' ! All the examples have single character or symbol rather than a character string such as I have here. Could you suggest how I would represent '</AAA>' as a valid Group Terminator?
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu Nov 10, 2005 1:44 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
All the examples have single character or symbol rather than a character string such as I have here. Could you suggest how I would represent '</AAA>' as a valid Group Terminator?
Fair point. You need to enter the tag as <LT>AAA<GT> and the Group Terminator as <LT>/AAA<GT>.
Back to top
View user's profile Send private message
TonyD
PostPosted: Thu Nov 10, 2005 2:43 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

Quote:

You need to enter the tag as <LT>AAA<GT> and the Group Terminator as <LT>/AAA<GT>


Thanks for that info!....I doubt that I would have worked that out. Will carry on experimenting along those lines.
Back to top
View user's profile Send private message Send e-mail
kishoreraju
PostPosted: Thu Nov 10, 2005 10:12 pm    Post subject: Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

<BUSMSG>
<AAA>11:222:::333:4</AAA>
<BBB>:::555</BBB>
<AAA>66:777</AAA>

<GRP>
<BBB>88888::99999</BBB>
<CCC>111:222</CCC>
<AAA>33::::44</AAA>
</GRP>
</BUSMSG>


i think it's deficult to define a message set for this(impossible) because <AAA>11:222:::333:4</AAA>
<BBB>:::555</BBB>
<AAA>66:777</AAA> initially these are at the root lavel.

but in next repeatation these elements present in <GRP></GRP>.

Can u please check the structure of the message .
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Fri Nov 11, 2005 1:22 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

kishoreraju : You could make a Complex Type to occur under the Root and use it also under some Child tags under the Root.....So that is not a problem.

But definitely this is a messed up Set....

I would like to know, is there anything in this set that is not dynamic.....i mean will there be only 'X' possible groups like AAA,BBB,CCC or BBB,AAA,AAA or CCC,AAA,BBB etc etc.........

Regards.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » TDS Help please!
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.