Author |
Message
|
w |
Posted: Fri May 20, 2011 5:16 am Post subject: Reset Content Descriptor Node (Urgent Help needed) |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
I am reading a file as blob and then converting it to XML via Reset Descriptor Node. Now the Reset Descriptor node is unable to parse a xml file if it is UTF-8 encoded.The same file it is parsing correctly if i change the encoding to ANSI .Can any of you plz explain wat is happening and what to do to make the node parse all encodings . 
Last edited by w on Fri May 20, 2011 5:21 am; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 20, 2011 5:20 am Post subject: Re: Reset Content Descriptor Node (Urgent Help needed) |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
w wrote: |
Now the Reset Descriptor node is unable to parse a xml file if it is UTF-8 encoded. |
What error is it throwing?
w wrote: |
Can any of you plz explain wat is happening and what to do to make the node parse all encodings .  |
Can you explain why you're trying to parse a message with a node that doesn't really parse anything rather than a Compute node or other parsing mechanism (which would be aware of the message encoding)? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
w |
Posted: Fri May 20, 2011 5:27 am Post subject: |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
Our requirement was such that we had to read files in multiple formats so we read it as blob and and then use RCD(Reset Content Descriptor ) to change it into XML.Is there any limitation in using RCD node can u plz send me a link. I thought we cud change the parser settings using RCD .
It just says parsing exception and that to not in the exception list . It is inside the XMLNSC(I found the error through debug). |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 20, 2011 5:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
w wrote: |
Our requirement was such that we had to read files in multiple formats so we read it as blob and and then use RCD(Reset Content Descriptor ) to change it into XML.Is there any limitation in using RCD node can u plz send me a link. |
It says here:
Quote: |
The ResetContentDescriptor node does not:
Change the message content; it changes message properties to specify the way in which the bit stream is parsed next time that the parser is started.
Convert the message from one format to another; for example, if the incoming message has a message format of XML and the outgoing message format is binary, the ResetContentDescriptor node does not do any reformatting. It starts the parser to recreate the bit stream of the incoming XML message, which retains the XML tags in the message. When the message is reparsed by a subsequent node, the XML tags are not valid and the parse fails.
|
When you say "multiple formats" do you mean different XML documents or different flat files? The RCD certainly won't do flat file -> XML for you and if they're all different XML why not just use XMLNSC from the start?
Indeed, how do you tell the blobs apart to inform it what to change the blob into?
w wrote: |
It just says parsing exception and that to not in the exception lit . It is inside the XMLNSC(I found the error through debug). |
Old advice but good advice - you get far more information out of a user trace than you do from the debugger, especially for this kind of problem. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Fri May 20, 2011 6:06 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
vitor: I think the RCD node is an acceptable choice here. Maybe 'w' does not need the message to be parsed immediately. In any case, the flow must be attempting to parse it, judging by the results that 'w' is reporting.
'w':
Quote: |
It just says parsing exception and that to not in the exception list . It is inside the XMLNSC(I found the error through debug). |
You need to learn how to debug a message flow. Errors from a message flow *always* come with a lot of information, and the debugger is not always the best place to look. Please do this:
- disconnect the debugger
- put a message through your flow
- look in Windows Event Viewer
The full text of the error message will be there in the event viewer. If you cannot find it there, please use the command line tools mqsichangetrace, mqsireadlog, mqsiformatlog to take a debug-level user trace and format it into a text file.
Nobody can help until you post the full text of the error. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri May 20, 2011 6:13 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
kimbert wrote: |
Please do this:
- disconnect the debugger
- put a message through your flow
- look in Windows Event Viewer
The full text of the error message will be there in the event viewer. If you cannot find it there, please use the command line tools mqsichangetrace, mqsireadlog, mqsiformatlog to take a debug-level user trace and format it into a text file.
Nobody can help until you post the full text of the error. |
Here endeth the sermon from the Rev Kimbert. (To be repeated soon by popular demand no doubt)  _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 20, 2011 6:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kimbert wrote: |
vitor: I think the RCD node is an acceptable choice here. Maybe 'w' does not need the message to be parsed immediately. In any case, the flow must be attempting to parse it, judging by the results that 'w' is reporting. |
I'm not saying it's unacceptable; I asked why he wasn't using a parsing node with encoding awareness. I could have said "what's the requirement to use an RCD" but I felt that didn't clearly lay out my question.
I'm still waiting for (and interested in) the answers to what the mix of multiple formats is, and how they're distinguished into their types & layouts.
kimbert wrote: |
You need to learn how to debug a message flow. Errors from a message flow *always* come with a lot of information, and the debugger is not always the best place to look. Please do this:
- disconnect the debugger
- put a message through your flow
- look in Windows Event Viewer
The full text of the error message will be there in the event viewer. If you cannot find it there, please use the command line tools mqsichangetrace, mqsireadlog, mqsiformatlog to take a debug-level user trace and format it into a text file.
Nobody can help until you post the full text of the error. |
(as I indicated above) but the OP hasn't indicated what OS is in use. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 20, 2011 6:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
smdavies99 wrote: |
Here endeth the sermon from the Rev Kimbert. (To be repeated soon by popular demand no doubt)  |
It bears repeating. The amount of information you don't get from the debugger surprises many people. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
joebuckeye |
Posted: Fri May 20, 2011 9:06 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
Vitor wrote: |
smdavies99 wrote: |
Here endeth the sermon from the Rev Kimbert. (To be repeated soon by popular demand no doubt)  |
It bears repeating. The amount of information you don't get from the debugger surprises many people. |
Give me a user trace with a dump of Root and maybe the environment and the code it is heading into and I can generally figure out what is happening in the code and why.
I can't even remember the last time I used the debugger in broker (v5 maybe). It was always too much hassle to get working (it may be better now in v7). |
|
Back to top |
|
 |
mqjeff |
Posted: Fri May 20, 2011 9:11 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
joebuckeye wrote: |
It was always too much hassle to get working (it may be better now in v7). |
Yes. And provides more reliability than it did in v5...
But still a usertrace is a better choice in most cases. Except, perhaps, where you need to step through java code. |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 20, 2011 9:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Except, perhaps, where you need to step through java code. |
Well I'll take your word for that....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
w |
Posted: Fri May 27, 2011 7:18 pm Post subject: |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
Sorry everyone for this extremely late reply.By this time i have been able to identify and solve the problem but still i thought i should answer all your queries.So here it is one by one.
@Vitor
By multiple files i mean files in different formats such as xml,text,xls etc. what i am doing is reading them in blob and then depending on the extension of the file(.txt,.xls etc) routing them to different RCD nodes for parsing.Hence this choice of RCD nodes.
@kimbert
I tried using your process to find the error and all it was saying was parsing error. Anyways thanks for the advice as i figured out yours is a faster method then debug.
Now to my problem.
The problem was with the encoding of the file. I had used the default character set encoding ID in the file node that was picking up the blob.This default was allowing only ANSI encoded files to be parsed.I then changed the encoding id to 1208 and it is now working fine for UTF-8 encoded files also.
And so my flow is now working perfectly.Thanks all for the replies u posted . |
|
Back to top |
|
 |
kimbert |
Posted: Sat May 28, 2011 7:29 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I tried using your process to find the error and all it was saying was parsing error. |
What do you mean by 'it'? What did you do, where did you look, and what *exactly* did you find? |
|
Back to top |
|
 |
|