Author |
Message
|
Maria_123 |
Posted: Wed Aug 08, 2007 2:06 pm Post subject: XML Messages - Parsing Problem |
|
|
Novice
Joined: 05 Oct 2006 Posts: 22
|
Hi,
Please could you help with this problem........
I have valid XML messages that arrive on my input queue. However, if these messages have spaces/line-feeds/comments....they fail to parse....
If i strip off the spaces..so that the XML in textpad fits on one line(unwrapped), then its passes well.
What could be the reason for this, and how could i deal with the problem,
Thanks in advance.
Maria |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 08, 2007 2:20 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Maria have you checked out the XMLNSC tree yet ?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Thu Aug 09, 2007 2:01 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
What could be the reason for this, and how could i deal with the problem |
Please quote the error message(s) that you are getting. 'they fail to parse' does not help very much.
Of course, you are already using XMLNSC, because you are developing a new message flow  |
|
Back to top |
|
 |
shalabh1976 |
Posted: Fri Aug 10, 2007 4:14 am Post subject: |
|
|
 Partisan
Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India
|
Make sure you specify the XMLNSC parser on the input node and not the XML parser. _________________ Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate |
|
Back to top |
|
 |
Maria_123 |
Posted: Tue Aug 28, 2007 11:03 am Post subject: |
|
|
Novice
Joined: 05 Oct 2006 Posts: 22
|
Hi,
I am still having the same problme..jus revisited it.
I get a message in blob domain and try to parse it using XML........the trace node that follows it does not give any content in the 'XMLNS area.
Would anyone have an idea.
What do the options for Validate immediately, content and value mean. I tried searching on the site of how to configure it,...but somehow the table is not tehre.
Thanks |
|
Back to top |
|
 |
Maria_123 |
Posted: Tue Aug 28, 2007 12:22 pm Post subject: |
|
|
Novice
Joined: 05 Oct 2006 Posts: 22
|
Thats the error i get..
'''Fatal Error: [3:2] The markup in the document preceding the root element must be well-formed.'''. |
|
Back to top |
|
 |
Maria_123 |
Posted: Tue Aug 28, 2007 12:40 pm Post subject: |
|
|
Novice
Joined: 05 Oct 2006 Posts: 22
|
And the format of the message prior to the Parser is MRM.MESSAGE....... |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 28, 2007 12:48 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The settings on the MQInput node should be to use the XMLNSC domain.
Not the XMLNS Domain. Not the XML Domain.
If you are using Create Field to parse a piece of an Input message as XML, then again you should be using XMLNSC. If you are still getting this error, then we need to see something more specific - including the full ExceptionList and ideally the code you're using. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Maria_123 |
Posted: Tue Aug 28, 2007 12:56 pm Post subject: |
|
|
Novice
Joined: 05 Oct 2006 Posts: 22
|
thanks for your reply jeff.
I receive the messsage as Mrm.Message:
(0x0100001B):MRM = (
(0x0300000B):MESSAGE = '<?xml version="1.0" encoding="UTF-8" ?>
etcetcetc...
I have configured this to be received into an MQInpout Queue which has XMLNSC as the messae domain. (all other properties are as default)
This is followed by a trace node...which does not output any change..the domain is still MRM.MESSAGE..... pelase could you advise
Thansk |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 28, 2007 1:15 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Do you by any chance have an RFH header on your message? This will override the parser on the input node...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Tue Aug 28, 2007 1:40 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
The markup in the document preceding the root element must be well-formed |
That suggests to me that
a) your document did not begin with the < of the root tag. The XML spec says that comments and processing instructions can come before the root tag, so that's not necessarily a problem...
b) the XML parser did not like what it saw before the root tag.
Maybe your code which separates the individual documents from one another has gone wrong, and you are passing badly-formed XML documents to the parser.
Quote: |
What do the options for Validate immediately, content and value mean |
See this topic: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ac00400_.htm |
|
Back to top |
|
 |
Maria_123 |
Posted: Tue Aug 28, 2007 2:10 pm Post subject: |
|
|
Novice
Joined: 05 Oct 2006 Posts: 22
|
Yes there is an RFH2 header which has the MCD etc set..... how can i then reset such a messae to XMLNSC? Is it a quetstion to nulling these values? |
|
Back to top |
|
 |
Maria_123 |
Posted: Tue Aug 28, 2007 2:21 pm Post subject: |
|
|
Novice
Joined: 05 Oct 2006 Posts: 22
|
Yes..the message does have an RFH2 header with the mcd properties set....
How can i make the XMLNSC parser override these set properties then. Is it a question of nulling the values ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Aug 28, 2007 3:00 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You'll have to use an RCD node. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Maria_123 |
Posted: Tue Aug 28, 2007 3:19 pm Post subject: |
|
|
Novice
Joined: 05 Oct 2006 Posts: 22
|
I'v tried that and the trace after that yields nothing in the XMLNSC area tag....am not able to get an idea of what could be wrong.... |
|
Back to top |
|
 |
|