ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » problem with ASBITSTREM, FolderBitStream and CRLF

Post new topic  Reply to topic
 problem with ASBITSTREM, FolderBitStream and CRLF « View previous topic :: View next topic » 
Author Message
dipankar
PostPosted: Fri Oct 14, 2005 3:29 am    Post subject: problem with ASBITSTREM, FolderBitStream and CRLF Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Hi All,
WINDOWS 2000, WMQI Broker V 2.1, CSD 8

Here is my input file.
Quote:
<?xml version="1.0" encoding="UTF-8"?>
<A><Dipu><abcd>dasdas</abcd></Dipu></A>

Here is my ESQL
Code:
SET OutputRoot.XML.WfMessage.StandardError.SourceData.XML.CDataSection) = CAST(ASBITSTREAM(InputBody.A.Dipu.[1] OPTIONS FolderBitStream) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);


This is the output
<WfMessage>
<ProcessTemplateCreateAndStartInstance/>
<StandardError>
<SourceData><![CDATA[<abcd>dasdas</abcd>]]></SourceData>
</StandardError>
</WfMessage>
This is what I am expecting. so far no problem.

But if I give the following input
Quote:
<?xml version="1.0" encoding="UTF-8"?>
<A>
<Dipu>
<abcd>dasdas</abcd>
</Dipu>
</A>

it does not work. The message is being rolled back.

please tell me how I can fix the problem.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 14, 2005 3:32 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

what is the error when the message is rolled back?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dipankar
PostPosted: Fri Oct 14, 2005 3:50 am    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

After tracing I got this

Quote:
Evaluating expression 'ASBITSTREAM(InputBody.A.Dipu)' at (16, 81).
2005-10-14 16:49:06.781000 3480 Error BIP2628E: Exception condition detected on input node 'TEST.MQInput1'.
The input node 'TEST.MQInput1' detected an error whilst processing a message. The message flow has been rolled-back and, if the message was being processed in a unit of work, it will remain on the input queue to be processed again. Following messages will indicate the cause of this exception.
Check the error messages which follow to determine why the exception was generated, and take action as described by those messages.
2005-10-14 16:49:06.781000 3480 RecoverableException BIP2230E: Error detected whilst processing a message in node 'TEST.test'.
The message broker detected an error whilst processing a message in node 'TEST.test'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2005-10-14 16:49:06.781000 3480 ParserException BIP5010E: XML Writing Errors have occurred.
Errors have occurred during writing of XML.
Review further error messages for an indication to the cause of the errors.
2005-10-14 16:49:06.781000 3480 ParserException BIP5007E: The Element has an invalid element type for a top level element.
A top level element was found which didn't have type xmlXmlDecl, xmlDocTypeDecl, xmlParserRoot, xmlComment, xmlProcessingInstruction or xmlWhiteSpace.
Check that the XML message being passed in is a well-formed XML message that adheres to the XML specification, and that the modifications being made to the message in the message flow are also consistent with the XML specification.
2005-10-14 16:49:07.781000 3480 UserTrace BIP2638I: The MQ output node 'TEST.MQInput1' attempted to write a message to the specified queue 'SYSTEM.DEAD.LETTER.QUEUE' connected to queue manager 'DIPU'. The MQCC was 0 and the MQRC was 0.
2005-10-14 16:49:07.781000 3480 UserTrace BIP2615I: The MQSeries input node 'TEST.MQInput1' has backed out the message to the backout requeue or the dead letter queue.
Message backout processing has been invoked, and the message has either been backed out by being written to the backout requeue or dead letter queue, as determined by the MQSeries queue manager and queue configuration.
No user action required.


In the exceptionlist I got
Quote:
<exception>
<exception>
<RecoverableException>
<File>F:\build\S210_BP\src\DataFlowEngine\ImbComputeNode.cpp</File>
<Line>453</Line>
<Function>ImbComputeNode::evaluate</Function>
<Type>ComIbmComputeNode</Type>
<Name>6c9e5a9b-0601-0000-0080-d7a49af3bc8a</Name>
<Label>TEST.test</Label>
<Text>Caught exception and rethrowing</Text>
<Catalog>WMQIv210</Catalog>
<Severity>3</Severity>
<Number>2230</Number>
<ParserException>
<File>F:\build\S210_BP\src\MTI\MTIforBroker\GenXmlParser2\XmlImbParser.cpp</File>
<Line>258</Line>
<Function>XmlImbParser::refreshBitStreamFromElements</Function>
<Type>ComIbmMQInputNode</Type>
<Name>48c8d671-0501-0000-0080-d7a49af3bc8a</Name>
<Label>TEST.MQInput1</Label>
<Text>XML Writing Errors have occurred</Text>
<Catalog>WMQIv210</Catalog>
<Severity>3</Severity>
<Number>5010</Number>
<ParserException>
<File>F:\build\S210_BP\src\MTI\MTIforBroker\GenXmlParser2\XmlImbParser.cpp</File>
<Line>241</Line>
<Function>XmlImbParser::refreshBitStreamFromElements</Function>
<Type>ComIbmMQInputNode</Type>
<Name>48c8d671-0501-0000-0080-d7a49af3bc8a</Name>
<Label>TEST.MQInput1</Label>
<Text>Invalid target for folder bitstream</Text>
<Catalog>WMQIv210</Catalog>
<Severity>3</Severity>
<Number>5907</Number>
<Insert>
<Type>5</Type>
<Text></Text>
</Insert>
<Insert>
<Type>2</Type>
<Text>33554432</Text>
</Insert>
<Insert>
<Type>5</Type>
<Text> </Text>
</Insert>
</ParserException>
</ParserException>
</RecoverableException>
</exception>


Thanks.[/quote]


Last edited by dipankar on Fri Oct 14, 2005 4:06 am; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 14, 2005 3:53 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Hrm.

Try putting <A> on the same line as <xml...> and see what it says.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dipankar
PostPosted: Fri Oct 14, 2005 4:12 am    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Jeff,
Please see the following input which are working fine.
Input 1:
Quote:
<?xml version="1.0" encoding="UTF-8"?>
<A><Dipu><abcd>dasdas</abcd>
</Dipu>
</A>


Input 2:
Quote:
<?xml version="1.0" encoding="UTF-8"?>
<A>
<Dipu><abcd>dasdas</abcd>
</Dipu>
</A>


But when I insert an CRLF after <Dipu>
then it creates an exception i.e when my input like
<?xml version="1.0" encoding="UTF-8"?>
<A>
<Dipu>
<abcd>dasdas</abcd>
</Dipu>
</A>

Please see the above exceptionlist. It is now changed. The previous was wrong.
Thanks for quick reply.
Back to top
View user's profile Send private message
dipankar
PostPosted: Fri Oct 14, 2005 4:16 am    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Jeff,

This is the trace for the last input shown above

Quote:
RecoverableException BIP2230E: Error detected whilst processing a message in node 'TEST.test'.
The message broker detected an error whilst processing a message in node 'TEST.test'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2005-10-14 17:42:41.875000 3480 ParserException BIP5010E: XML Writing Errors have occurred.
Errors have occurred during writing of XML.
Review further error messages for an indication to the cause of the errors.
2005-10-14 17:42:41.875000 3480 ParserException BIP5907E: Invalid target.
The target element must be a name element and may not have a value. In addition, the element must not be marked as 'special'. The supplied element has name '', type '33554432', and value '
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 14, 2005 4:21 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Okay, this makes a lot more sense now.

You're asking for the first child of Dipu (ASBITSTREAM(InputBody.A.Dipu.[1] ).

When you have CR/LFs in your XML, then they are parsed and stored as elements in the logical message tree. So when you put CR/LF after <Dipu>, you are making the CR/LF element to *be* the first child of <Dipu>.

And a single element is not a folder, and so ASBITSTREAM is complaining.

You should be able to qualify InputBody.A.Dipu.[1] in some way to skip anything that's not an XML.Element.

Or at least, you should be able to create a reference that points to the first XML.Element child of Dipu. And then pass that to ASBITSTREAM.

Or if worst comes to worst, you can parse out CR/LFs in various ways.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dipankar
PostPosted: Fri Oct 14, 2005 4:35 am    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Hi Jeff,
Quote:
Or at least, you should be able to create a reference that points to the first XML.Element child of Dipu. And then pass that to ASBITSTREAM.


I am trying out with this. Thanks a lot
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Oct 14, 2005 7:47 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
You should be able to qualify InputBody.A.Dipu.[1] in some way to skip anything that's not an XML.Element.

Not tested:
Code:
InputBody.A.Dipu.(XML.Element)*[1]


Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
dipankar
PostPosted: Mon Oct 17, 2005 8:02 pm    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Excellent EddieA, it is working fine.

Fantastic Jeff.

Thanks a lot to both of you.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » problem with ASBITSTREM, FolderBitStream and CRLF
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.