Author |
Message
|
angka |
Posted: Wed Mar 18, 2009 1:54 am Post subject: ResetContentDescriptor node error parsing CCSID 1200 |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
I used the ResetContentDescriptor node to parse the message content from BLOB to XML with the message CCSID set as 1200(.net app sending the message). I got the following error:
XML Parsing Errors have occurred. An error has been reported by the BIPXML4C component. Invalid document structure.
Is it the node can't parse message with CCSID 1200?
Thanks |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Wed Mar 18, 2009 1:59 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Looks like invalid XML to me, RCD can work with 1200 fine, have you tried running a trace to see exactly why the broker doesnt like the XML?
Is the 1200 set on the XML and the message? |
|
Back to top |
|
 |
MQEnthu |
Posted: Wed Mar 18, 2009 2:43 am Post subject: |
|
|
 Partisan
Joined: 06 Oct 2008 Posts: 329 Location: India
|
angka wrote: |
Is it the node can't parse message with CCSID 1200? |
CCSID 1200 for RCD node should not be a problem. Check if the message is wellformed XML message and adheres to the XML spec.. _________________ -----------------------------------------------
It is good to remember the past,
but don't let past capture your future |
|
Back to top |
|
 |
kimbert |
Posted: Wed Mar 18, 2009 3:12 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Is it the node can't parse message with CCSID 1200? |
Parsing is done by parsers, not by nodes. Nodes which can trigger parsing all use the same underlying set of parsers. All of message broker's XML parsers can deal with just about any code page.
I can see at least 4 possibilities here
- Your input message is not in code page 1200
- Your input message is in code page 1200 but is not a well-formed XML document ( truncated? )
- You got the CAST to BLOB code wrong in your ESQL, so it doesn't even look like XML
- There is a defect in the XML parser that you are using ( probably XMLNS )
The last one is highly unlikely, so you should carefully check your document. A good way to do that is to attempt to parse it using another XML parser - maybe write it to a file and open it with a browser. |
|
Back to top |
|
 |
angka |
Posted: Sun Mar 22, 2009 10:34 pm Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi all,
The input message is in code page 1200. I tested the XML document and it can be displayed using broswer. I did not write esql to CAST the incoming message to BLOB, i just let the MQInputnode to do it by not setting anything on the Message Domain under default tab. I am using XML for the Message Domain on the ResetContentDescriptor node. running a trace cannot capture anything because it is all in BLOB before passing thru the ResetContentDescriptor node.
Below is a short description on how the message is formed and received by the Broker Queue Manager:
End System QM -> Broker QM
End user enter data using Broswer and the xml content is inserted into Database in varchar. MQ application using .net(CCSID default as 1200) picks up from the Database and put to remote queue and sends to Broker QM.
Broker flow picks up the message and after some computation pass the message thru the ResetContentDescriptor node. Here is where the problem arise.
With the same message content, but with the MQ application in the End System QM end setting the CCSID to 437, the message went thru without error when passing thru the ResetContentDescriptor node.
Btw the xml document encoding is set as utf-16.
Thanks. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Mon Mar 23, 2009 1:59 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
angka wrote: |
Hi all,
running a trace cannot capture anything because it is all in BLOB before passing thru the ResetContentDescriptor node.
Thanks. |
Running a trace should still show you an error message detected in the RCD node (i'm not talking about using the visual debugger here). Failing this are you able to print the Exception Tree after the catch terminal of the input node?
What code page is the DB in? |
|
Back to top |
|
 |
kimbert |
Posted: Mon Mar 23, 2009 3:10 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
running a trace cannot capture anything |
That depends on whether you mean 'using a Trace node' or 'taking a user trace'. |
|
Back to top |
|
 |
angka |
Posted: Mon Mar 23, 2009 3:54 am Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
The Exception tree is something like this
XML Parsing Errors have occurred. An error has been reported by the BIPXML4C component. Invalid document structure.
My Database is using 2 byte per char which is CCSID 1200.
Thanks |
|
Back to top |
|
 |
MQEnthu |
Posted: Mon Mar 23, 2009 4:08 am Post subject: |
|
|
 Partisan
Joined: 06 Oct 2008 Posts: 329 Location: India
|
angka wrote: |
The Exception tree is something like this
XML Parsing Errors have occurred. An error has been reported by the BIPXML4C component. Invalid document structure. |
Did you check this??
MQEnthu wrote: |
Check if the message is wellformed XML message and adheres to the XML spec.. |
And THIS??
kimbert wrote: |
A good way to do that is to attempt to parse it using another XML parser - maybe write it to a file and open it with a browser. |
_________________ -----------------------------------------------
It is good to remember the past,
but don't let past capture your future |
|
Back to top |
|
 |
angka |
Posted: Mon Mar 23, 2009 7:56 am Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
the message is well formed cos with CCSID 437 it can be parsed.. I tested the XML document and it can be displayed using broswer.
Thanks |
|
Back to top |
|
 |
kimbert |
Posted: Mon Mar 23, 2009 2:16 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You said...
Quote: |
I used the ResetContentDescriptor node to parse the message content from BLOB to XML with the message CCSID set as 1200 |
and...
Quote: |
The input message is in code page 1200 |
and now you are saying...
Quote: |
the message is well formed cos with CCSID 437 it can be parsed |
Is your message in code page 437, or in code page 1200? If it is in code page 437, then it cannot be parsed using code page 1200. |
|
Back to top |
|
 |
angka |
Posted: Mon Mar 23, 2009 10:14 pm Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
I meant with the same message i tried 1200 and 437.. 437 went thru successfully but 1200 failed |
|
Back to top |
|
 |
kimbert |
Posted: Tue Mar 24, 2009 2:53 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I am now very confused. Please explain the problem again. |
|
Back to top |
|
 |
angka |
Posted: Tue Mar 24, 2009 3:58 am Post subject: |
|
|
Chevalier
Joined: 20 Sep 2005 Posts: 406
|
Hi,
What I meant is i tried changing End System MQ Application to put the message CCSID as 437 and it parses successfully. But when the MQ Application put the message with CCSID 1200 it failed.
Btw I did some test. I create a xml document(encoding=utf-16) using notepad and saved it as Unicode encoding with .xml extension. it can be viewed using broswer.
i open the file using rfhutil with CCSID 1200 and put to the broker queue, it went thru successfully. i realised there is some different btw the message i received from the End System MQ Application and the one tt i created using notepad from the Data tab in rftutil. the message tt i created have 2 special bytes(BOM) FFFE in front of the xml but the one tt i received did not have tt.
FFFE is to tell the xml parser it is utf-16 and little endian. could it be due to this reason tt my node can't parse the message?
Thanks |
|
Back to top |
|
 |
kimbert |
Posted: Tue Mar 24, 2009 4:18 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The FFFE is a Byte Order Mark ( BOM ). Obviously, if you need a BOM and it is missing, then the XML will look like garbage to the WMB parser. Why don't you try adding a BOM while the message is in the BLOB domain, and see whether that fixes the problem? |
|
Back to top |
|
 |
|