Author |
Message
|
rksuresh |
Posted: Thu May 02, 2002 10:26 am Post subject: |
|
|
Novice
Joined: 11 Apr 2002 Posts: 24
|
I am a newbie to MQSI and begun to start playing with it. I was testing a simple ESQL script which parses the XML input. Since the input was an XML I did not define it in Message Set.
The XML input to the queue was the following.
<?xml version="1.0" encoding="UTF-8" standalone="yes">
<Proof>
<beer>5</beer>
<wine>12</wine>
<gin>40</gin>
</Proof>
In the compute node I had the following ESQL script. I had joined both the MQInput and MQOutput to the Compute node in the message flow.
This is the script in the Compute node.
SET OutputRoot.XML.Data =ROW(InputBody.Proof.beer,
InputBody.Proof.wine AS vin,
(InputBody.Proof.gin *2)AS special);
But there is no output at all, the output queue is just empty.
I am not sure what could be the problem. If I just set the OutputRoot to InputRoot, I get the same xml message in the output queue.
ANy help.
thanks
-suresh
|
|
Back to top |
|
 |
kirani |
Posted: Thu May 02, 2002 12:35 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Suresh,
Attach a Trace node to your MQInput nodes catch terminal and write the trace output to a file. Print ${ExceptionList} into that trace node and post the output of that trace node here. Is your message going to Dead letter queue?
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
rksuresh |
Posted: Thu May 02, 2002 3:09 pm Post subject: |
|
|
Novice
Joined: 11 Apr 2002 Posts: 24
|
Thanks for your reply.
I dont think there is a dead letter queue, I might have to create one.
I connected the failure terminal to the same output queue, the input message showed up without any parsing.
Let me try to trace.
-suresh
|
|
Back to top |
|
 |
rksuresh |
Posted: Thu May 02, 2002 3:33 pm Post subject: |
|
|
Novice
Joined: 11 Apr 2002 Posts: 24
|
I connected the mqinput failure node to the trace node and redirected to a filename. In the pattern "Print ${ExceptionList}" was coded, but still dont see any trace information.
Am I doing anything fundamentally wrong?
-suresh
|
|
Back to top |
|
 |
kirani |
Posted: Thu May 02, 2002 3:49 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Do like this,
MQInput(out)->TryCatch(try)->Compute->MQOutput
TryCatch(catch)->Trace
In the Trace node, set destination to File and then type the complete path in FilePath. In pattern type '${ExceptionList}' (without '')
Since you are sending XML message as input, you should set Message Domain to XML in MQInpput node.
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
devans |
Posted: Fri May 03, 2002 1:39 am Post subject: |
|
|
Apprentice
Joined: 18 Mar 2002 Posts: 43
|
Is there any information in your event log?
Have you made sure that your message has a valid MQMD folder before sending it to the MQOutput node? |
|
Back to top |
|
 |
rksuresh |
Posted: Fri May 03, 2002 9:03 am Post subject: |
|
|
Novice
Joined: 11 Apr 2002 Posts: 24
|
Finally got the trace to work, Exception is repeated more than one time in the trace file.
XML Input:
<?xml version="1.0" encoding="UTF-8" standalone="yes">
<Proof>
<beer>5</beer>
<wine>12</wine>
<gin>40</gin>
</Proof>
Compute node script:
SET OutputRoot.XML.Data =ROW(InputBody.Proof.beer,
InputBody.Proof.wine AS vin,
(InputBody.Proof.gin *2)AS special);
Trace output:
(
(0x1000000)RecoverableException = (
(0x3000000)File = 'F:/build/S202_P/src/DataFlowEngine/ImbComputeNode.cpp'
(0x3000000)Line = 354
(0x3000000)Function = 'ImbComputeNode::evaluate'
(0x3000000)Type = 'ComIbmComputeNode'
(0x3000000)Name = '376f2a92-ed00-0000-0080-84386e4ec241'
(0x3000000)Label = 'MQSI_TEST1.Compute1'
(0x3000000)Text = 'Caught exception and rethrowing'
(0x3000000)Catalog = 'MQSIv202'
(0x3000000)Severity = 3
(0x3000000)Number = 2230
(0x1000000)ParserException = (
(0x3000000)File = 'F:/build/S202_P/src/MTI/MTIforBroker/GenXmlParser/XmlImbParser.cpp'
(0x3000000)Line = 809
(0x3000000)Function = 'XmlImbParser::parseFirstChild'
(0x3000000)Type = ''
(0x3000000)Name = ''
(0x3000000)Label = ''
(0x3000000)Text = 'XML Parsing Errors have occurred'
(0x3000000)Catalog = 'MQSIv202'
(0x3000000)Severity = 3
(0x3000000)Number = 5009
(0x1000000)ParserException = (
(0x3000000)File = 'F:/build/S202_P/src/MTI/MTIforBroker/GenXmlParser/XmlBrokerAsgardParser.cpp'
(0x3000000)Line = 2072
(0x3000000)Function = 'XmlBrokerAsgardParser::error'
(0x3000000)Type = ''
(0x3000000)Name = ''
(0x3000000)Label = ''
(0x3000000)Text = 'An error has been reported by the BIPXML4C component.'
(0x3000000)Catalog = 'MQSIv202'
(0x3000000)Severity = 3
(0x3000000)Number = 5004
(0x1000000)Insert = (
(0x3000000)Type = 2
(0x3000000)Text = '65573'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = ''
)
(0x1000000)Insert = (
(0x3000000)Type = 2
(0x3000000)Text = '1'
)
(0x1000000)Insert = (
(0x3000000)Type = 2
(0x3000000)Text = '54'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'Expected whitespace'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'XML'
)
)
)
)
)
Thanks
-suresh
|
|
Back to top |
|
 |
kirani |
Posted: Fri May 03, 2002 9:10 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
guess, you are missing '?' in xml declaration. The message should be like this,
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Proof>
<beer>5</beer>
<wine>12</wine>
<gin>40</gin>
</Proof>
(add ? after standalone="yes").
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
rksuresh |
Posted: Fri May 03, 2002 9:22 am Post subject: |
|
|
Novice
Joined: 11 Apr 2002 Posts: 24
|
The new exception is "Cannot evaluate '%1 %2 %3' because the types are incompatible".
The value 40 for the gin tag is treated as String, I think it fails when I try to multiply it by 2. Should I have an MRM Message set to identify <gin> tag as integer? Is there any other way?
thanks
-suresh
|
|
Back to top |
|
 |
rksuresh |
Posted: Fri May 03, 2002 9:53 am Post subject: |
|
|
Novice
Joined: 11 Apr 2002 Posts: 24
|
After I remove the multiplication I get an other exception "Message Contains no Data" What does this mean?
I am sorry guys, I think I should do some more reading.
-suresh
Exception:
(0x1000000)RecoverableException = (
(0x3000000)File = 'F:/build/S202_P/src/DataFlowEngine/ImbMqOutputNode.cpp'
(0x3000000)Line = 1239
(0x3000000)Function = 'ImbMqOutputNode::evaluate'
(0x3000000)Type = 'ComIbmMQOutputNode'
(0x3000000)Name = 'e5435e92-ed00-0000-0080-84386e4ec241'
(0x3000000)Label = 'MQSI_TEST1.MQOutput2'
(0x3000000)Text = 'Caught exception and rethrowing'
(0x3000000)Catalog = 'MQSIv202'
(0x3000000)Severity = 3
(0x3000000)Number = 2230
(0x1000000)RecoverableException = (
(0x3000000)File = 'F:/build/S202_P/src/DataFlowEngine/ImbMqOutputNode.cpp'
(0x3000000)Line = 461
(0x3000000)Function = 'ImbMqOutputNode::evaluate'
(0x3000000)Type = 'ComIbmMQOutputNode'
(0x3000000)Name = 'e5435e92-ed00-0000-0080-84386e4ec241'
(0x3000000)Label = 'MQSI_TEST1.MQOutput2'
(0x3000000)Text = 'Message contains no data'
(0x3000000)Catalog = 'MQSIv202'
(0x3000000)Severity = 3
(0x3000000)Number = 2617
)
)
) |
|
Back to top |
|
 |
kirani |
Posted: Fri May 03, 2002 10:58 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Did you select "Copy Message Headers" in your Compute node? If not, you should do that. Hopefully this will solve the problem.
If, for some reason your field reference is resolved to NULL, i.e. if InputBody.Proof.beer, ... are resolved to NULL in ROW function, you will get an empty tag message like,
<Data/>
I am using WMQI 2.1 on Win2K with CSD2 installed and I am facing this problem. Any field reference in ROW function is getting resolved to NULL. If I hardcode the value in ROW function, it works fine. For example,
SET OutputRoot.XML.Data = ROW('WMQI' as Name, '2.1' as Version) will produce
<Data>
<Name>WMQI</Name>
<Ver>2.1</Ver>
</Data>
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
rksuresh |
Posted: Fri May 03, 2002 12:13 pm Post subject: |
|
|
Novice
Joined: 11 Apr 2002 Posts: 24
|
Thanks Kiran for all your suggestions and help.
I finally got the message put in the output queue, I am going to read on some materials for XML + ESQL processing. Do you recommend any?
I should just work on one of the compute stuff for the <gin> tag. Should I define a message set for this? Are all the XML values treated as String?
Any information would be appreciated and thanks for all your help.
-suresh
|
|
Back to top |
|
 |
kirani |
Posted: Fri May 03, 2002 1:15 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Suresh,
You need not define your XML message into MRM at this stage. Yes, all XML values are treated as Strings in WMQI. However, WMQI does implicit casts for some of the data types. For more information about this, please refer to ESQL Reference manual.
I would recommend that you go thru all WMQI books (Introduction and Planning, ESQL Reference and Working with messages, ...). these books can be downloaded from url,
http://www-3.ibm.com/software/ts/mqseries/library/manualsa/manuals/wsmqsiv21.html
_________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|