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 » CSV to XML

Post new topic  Reply to topic Goto page 1, 2  Next
 CSV to XML « View previous topic :: View next topic » 
Author Message
rvikky
PostPosted: Thu Mar 23, 2006 3:33 am    Post subject: CSV to XML Reply with quote

Apprentice

Joined: 14 Feb 2006
Posts: 32
Location: Bangalore

I want to convert a message in CSV(Comma Separated Value) type to XML format. For example; "rvikky,bangalore" is the message and i want to convert it to <Details><Name>rvikky</Name><Place>Bangalore</Place></Details>
I've used a message set and message flow. message set has the target type where i have used TDS format and delimiter as ','. In compute node I've given "SET OutputRoot.Properties.MessageFormat='XML';".
This doesn't work and from my IN queue the message goes to backout requeue queue.

Someone pl. tell me the steps to do this.
Back to top
View user's profile Send private message
wschutz
PostPosted: Thu Mar 23, 2006 3:37 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Assuming you don't have a rfh2 header, did you set the "Default" domain (MRM) / message set / type / format on the MQInput node?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
elvis_gn
PostPosted: Thu Mar 23, 2006 3:42 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi rvikky,

So ur getting the input as TDS and simply changing the Format to XML in a compute node,...right ?

So have you defined an XML message set ?

What have you set for the Message Type and set ID, that must be still pointing to the TDS message set....Dont copy the values from the input.

Can you also post the error from the event log...

Regards.
Back to top
View user's profile Send private message Send e-mail
rvikky
PostPosted: Thu Mar 23, 2006 3:44 am    Post subject: Reply with quote

Apprentice

Joined: 14 Feb 2006
Posts: 32
Location: Bangalore

I've set
Message Domain = MRM
Message Set = SampleSet (CD3J030002001) -thatz the name i've used
Message Type = Message
Message Format = TDS1
Back to top
View user's profile Send private message
wschutz
PostPosted: Thu Mar 23, 2006 3:46 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Did you wire a "Trace" node to the "Catch" terminal? If so, post the exception thats being thrown ....
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
rvikky
PostPosted: Thu Mar 23, 2006 3:50 am    Post subject: Reply with quote

Apprentice

Joined: 14 Feb 2006
Posts: 32
Location: Bangalore

there is no error in event log.
the error i get in the .mset file is
Severity Description Resource In Folder Location Creation Time
1 Element 'Name' has default TDS Length of zero. If it is used in a TDS message, that message will not be parsed successfully. Physical format: 'TDS1'. SampleDefn.mxsd Sample/SampleSet line 0 March 23, 2006 3:53:43 PM
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Thu Mar 23, 2006 4:03 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi rvikky,

So ur getting the error...is it stopping you from deploying the flow....I guess not from your first post...

You should use Variable length delimited to avoid getting the above error.

Now for your first issue
Quote:
Message Set = SampleSet (CD3J030002001)

You cannot use this,as this will make MB look for the set and cross verify with it....or otherwise you should add the XML format to the set and make another message definition in XML...

Edited:
I think I am wrong...are u running the validation on the compute...unles you did, you shouldn't have got the error...
You should try to get us some sort of error to work with...

Regards.
Back to top
View user's profile Send private message Send e-mail
wschutz
PostPosted: Thu Mar 23, 2006 4:12 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

As Elvis says, we need to see the exception being thrown:
wschutz wrote:
Did you wire a "Trace" node to the "Catch" terminal? If so, post the exception thats being thrown ....

_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
rvikky
PostPosted: Thu Mar 23, 2006 4:28 am    Post subject: Reply with quote

Apprentice

Joined: 14 Feb 2006
Posts: 32
Location: Bangalore

I tried wiring a Trace node and gave destination as file. File is not getting created. My system became very slow after I gave
"SET OutputRoot.Properties.MessageFormat ='XML'"
Whenever I put a message in IN queue, my system almost hangs for 10 mins.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 23, 2006 5:18 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

OK, here's what to do:

- Put a trace node immediately after the MQInput node, and trace ${Root}
- If the trace does not look right, change your message set until it is. We'll help if you have trouble working out what to do.
- If you need further help, post the main details of your message set here ( logical structure and TDS properties )

The output side is easy once you have parsed the input message properly.

elvis_gn wrote:
Quote:
You should use Variable length delimited to avoid getting the above error
No - this is a common mistake. You should be using 'All Elements Delimited' for a CSV structure.
Back to top
View user's profile Send private message
JT
PostPosted: Thu Mar 23, 2006 5:27 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Quote:
I tried wiring a Trace node and gave destination as file. File is not getting created.

Your level of WBI experience is unknown, so I'll just ask: does the broker (re: id) have permissions to write the file that you specified in the file path parameter of the Trace node.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 23, 2006 9:05 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
File is not getting created.
Try using UserTrace as your destination instead.
Back to top
View user's profile Send private message
rvikky
PostPosted: Thu Mar 23, 2006 7:46 pm    Post subject: Reply with quote

Apprentice

Joined: 14 Feb 2006
Posts: 32
Location: Bangalore

i'm just learning WMB and I tried converting CSV to XML. In the message set Defn. file I've given <Message><Details><Name></Name><Place></Place></Details></Message>
Message and Details are complex types and rest are strings.
It would be helpful if someone can give me the steps to convert a CSV or TDS to XML format in WMB.
I've tried trace node and it has worked. So I think the broker has the rights to write into a file.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Thu Mar 23, 2006 7:51 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi rvikky,

So where do you currently stand ?

Can we look at the trace before and after the compute...

Post you code too.

Regards.
Back to top
View user's profile Send private message Send e-mail
rvikky
PostPosted: Thu Mar 23, 2006 8:09 pm    Post subject: Reply with quote

Apprentice

Joined: 14 Feb 2006
Posts: 32
Location: Bangalore

i'm not getting any output from trace node.
The code I gave in Compute node is
SET OutputRoot.Properties.MessageFormat ='XML'
I actually opened a sample and tried doing this by looking at all the steps and values given.
Sample works properly but the one created stalls my computer for around 5 mins. when i put some message into IN queue and finally the message goes to backout queue.
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 » CSV to XML
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.