|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMQI XML parsing without paired tags |
« View previous topic :: View next topic » |
Author |
Message
|
PaulHuang |
Posted: Thu Mar 21, 2002 5:22 pm Post subject: |
|
|
Novice
Joined: 31 Jul 2001 Posts: 18
|
hello!
In WMQI V2.1 , I've found that if a XML tag not in pair , for example , there is a <Message> , but has no </Message> and WMQI will still successfully parse this message into OK queue. Does it has any problem with WMQI V2.1 XML parser ?
MQInput Node
Message Domain -> XML
Compute Node
Set OutputRoot = InputRoot
IF "InputRoot"."XML"."Head"."F101" NOT NULL || "InputRoot"."XML"."Head"."Message" NOT NULL
SET OutputRoot.XML.Status = "Y"
ELSE
SET OutputRoot.XML.Status = "N"
END IF
Compute Node => Output => OK Queue
=> Fail => Fail Queue
When I put a message without a </Message>
<?xml version="1.0" encoding = "Big5" ?>
<XmlForm>
<Head>
<F101>0100700001</F101>
<F102>0100700001</F102>
<F103>33333333</F103>
<F104>01</F104>
<F105>0</F105>
<F106>20020303222222</F106>
<F111>000000</F111>
</Head>
<Message>
</XmlForm>
This message will go to OK queue.
Does it the parser problem or my problem ? |
|
Back to top |
|
 |
kirani |
Posted: Thu Mar 21, 2002 6:22 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Hi,
The above code wouldn't work. You must have mistyped it. I tried testing following ESQL on my box (WMQI2.1 on WIN2K),
SET OutputRoot = InputRoot;
IF ("InputRoot"."XML"."Head"."F101" IS NOT NULL OR "InputRoot"."XML"."Head"."Message" IS NOT NULL) THEN
SET OutputRoot.XML.Status = 'Y' ;
ELSE
SET OutputRoot.XML.Status = 'N' ;
END IF ;
and the message goes to failure queue. It is giving me following exception,
(
(0x1000000)RecoverableException = (
(0x3000000)File = 'F:buildS210_PsrcDataFlowEngineImbMqOutputNode.cpp'
(0x3000000)Line = 708
(0x3000000)Function = 'ImbMqOutputNode::evaluate'
(0x3000000)Type = 'ComIbmMQOutputNode'
(0x3000000)Name = 'c3990830-ec00-0000-0080-ff4d00d758d4'
(0x3000000)Label = 'test_qtof.MQOutput2'
(0x3000000)Text = 'Caught exception and rethrowing'
(0x3000000)Catalog = 'WMQIv210'
(0x3000000)Severity = 3
(0x3000000)Number = 2230
(0x1000000)ParserException = (
(0x3000000)File = 'F:buildS210_PsrcMTIMTIforBrokerGenXmlParser2XmlImbParser.cpp'
(0x3000000)Line = 217
(0x3000000)Function = 'XmlImbParser::refreshBitStreamFromElements'
(0x3000000)Type = 'ComIbmMQInputNode'
(0x3000000)Name = 'd5390730-ec00-0000-0080-ff4d00d758d4'
(0x3000000)Label = 'test_qtof.MQInput1'
(0x3000000)Text = 'XML Writing Errors have occurred'
(0x3000000)Catalog = 'WMQIv210'
(0x3000000)Severity = 3
(0x3000000)Number = 5010
(0x1000000)ParserException = (
(0x3000000)File = 'F:buildS210_PsrcMTIMTIforBrokerGenXmlParser2XmlImbParser.cpp'
(0x3000000)Line = 505
(0x3000000)Function = 'XmlImbParser::checkForBodyElement'
(0x3000000)Type = ''
(0x3000000)Name = ''
(0x3000000)Label = ''
(0x3000000)Text = 'No valid body of the document could be found.'
(0x3000000)Catalog = 'WMQIv210'
(0x3000000)Severity = 3
(0x3000000)Number = 5005
)
)
)
)
Eitehr you can change your compute node to pass "message headers" only or change your esql to
IF ....
THEN
SET OutputRoot.XML.XmlForm.Status = 'Y' ;
ELSE
SET OutputRoot.XML.XmlForm.Status = 'N' ;
END IF ;
This time message went to output queue. If I pass invalid XML message, message goes to failure queue. So XML Parser works as expected!
Kiran
|
|
Back to top |
|
 |
PaulHuang |
Posted: Thu Mar 21, 2002 10:42 pm Post subject: |
|
|
Novice
Joined: 31 Jul 2001 Posts: 18
|
hi, thanks for the response. The existance of the compute node is due to the encounter of when Input node processing a none-wellform XML data (in this case, the <Message> tag is missing), it still outputs to the "out" terminal instead of "failure" terminal. This is happening when the broker running on AIX platform but not on NT platform. Is it correct the xml parser carried out parsing when message is processed at Input NODE?
thanks! |
|
Back to top |
|
 |
kirani |
Posted: Fri Mar 22, 2002 9:42 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What CSD are you using on AIX box?
MQSI uses Justintime parsing, i.e. MQSI will parse the message when you refer to the parsed field for the first time. You can force parser at MQInput node by selecting "Validate Message" option.
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|