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 to XML Conversion

Post new topic  Reply to topic
 TDS to XML Conversion « View previous topic :: View next topic » 
Author Message
Mensch
PostPosted: Fri Oct 06, 2006 12:06 am    Post subject: TDS to XML Conversion Reply with quote

Disciple

Joined: 17 Jul 2005
Posts: 166

HI
i am trying to convert TDS message with repeating fields in to XML
for this I have created message set as follows
TDS To XML Conversion Message Set
1) Created complex type t_employee
Properties :
Data Element Seperation : Variable Length elements delimited
Delimeter : <CR><LF>
2) Added local comples type emp
With Repeating element delimeter as ,
3)added two local elements in to emp as ename and eid both string

Input to the flow is : a,a[/n]b,b[/n]c,c ( /n is new line)
In copmute node I am trying to convert this comma sepereated message in to XML
But Parser is throwing exception and asking me to change my logical message set.
Please correct my message set

P.S: WMB6 , MQ6 , Local Windows PC
_________________
Thanks and Regards ,
Mensch
Back to top
View user's profile Send private message
Edde
PostPosted: Fri Oct 06, 2006 12:26 am    Post subject: Reply with quote

Acolyte

Joined: 01 Oct 2006
Posts: 67
Location: Moscow, Russia

Hi Mensch.

Did you seen CSV example in Samples Gallery/Technology samples?

I can't exactly define your error, but this can be one of:
1. If you choose Variable Length elements delimited, you must have Length property for each field set to 0. In CSV use of All elements delimited is preferred.
2. In your example you must specify Delimiter in "local complex type" (probably you mean local group), not Repeating Element Delimiter. RED is specified when you have one element with more than 1 occurence. But you have 2 elements, each with 1 occurence.


You can also read "TDS Format/Data element separation" topic in help.


Last edited by Edde on Fri Oct 06, 2006 12:28 am; edited 1 time in total
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Oct 06, 2006 12:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So you are converting a CSV message to XML. v6 contains a whole set of samples showing how to parse different types of CSV message.
By the way 'Variable Length Elements Delimited' is not what you think it is. Read the docs. You should almost certainly be using 'All Elements Delimited'.
Back to top
View user's profile Send private message
Mensch
PostPosted: Fri Oct 06, 2006 1:59 am    Post subject: Reply with quote

Disciple

Joined: 17 Jul 2005
Posts: 166

Hi

Thanks for your prompt reply
I have imported all the CSV samples ..but all samples are using inputs with single record.
I am trying to parse input CSV with multiple records.I mean one file with three records each containing two elements delimited by '',".
_________________
Thanks and Regards ,
Mensch
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 06, 2006 2:15 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So you need to structure your logical message to tell the parser that one piece can repeat.

You could do this a number of ways.

Suppose you have your message as the only group - so your structure looks like
Message
[*]Field1
[*]Field2

You can set repeating options on the Message group, to tell the parser that the bitstream contains multiple copies of the Message.

Or you can do this
Message
[*]Group
[*][*]Field1
[*][*]Field2

And tell the parser that Group repeats.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Edde
PostPosted: Fri Oct 06, 2006 2:32 am    Post subject: Reply with quote

Acolyte

Joined: 01 Oct 2006
Posts: 67
Location: Moscow, Russia

I have first sample (CSV_msg1.enqueue) with this data:
Code:
Bob,Dyson,1 Desolation Row,Orlando,FL,32802,HYT-457-AX
Jimmy,Pace,1002 Misty Mountain Drive,New York,NY,10001,ADU-239-BX
Ralf,McCartney,67 Penny Lane,Las Vegas,NV,89125,JUI-854-CF
Elvis,John,3 Yellow Brick Road,Chicago,IL,60699,GGY-118-AS
Rick,Clayton,461 Ocean Boulevard,Miami,FL,33101,LOP-212-TY

It contains 5 records.
You have something else?
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Oct 06, 2006 2:33 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
In copmute node I am trying to convert this comma sepereated message in to XML
Please post the output XML message for the input message that you quoted earlier.

Your problem description is incomplete. Here's what I think you mean. Please correct me if I'm wrong:
- The input message always has exactly 3 lines.
- Lines are separated by a single carriage return
- The last line is not terminated by a carriage return.
- The first line contains 0..n occurrences of element 'a', with occurrences separated by a comma.
- The second line contains 0..n occurrences of element 'b', with occurrences separated by a comma.
- The third line contains 0..n occurrences of element 'c', with occurrences separated by a comma.
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 » TDS to XML Conversion
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.