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 » WMB event monitoring generating invalid XML

Post new topic  Reply to topic Goto page 1, 2  Next
 WMB event monitoring generating invalid XML « View previous topic :: View next topic » 
Author Message
kishoreraju
PostPosted: Fri Jul 17, 2009 9:51 am    Post subject: WMB event monitoring generating invalid XML Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

Hi,

I have configured my message flow to generate an event if the message is delivered successfully.evertthing working ifne but the Event Message is not a valid one When i am processing the event message by using another flow it was failing because of some parsing errors.Broker is not able to parse because of some special characters in the CDATA section.

The below is my configuration

EventSOurce: InTerminal
EventSourceAdd:MQOutput.terminal.in
Selected the check box for Include bitstream data in paylod option
Set Content to ALL and Ecoding=CDATA.


The below is the Event Message


Code:
- <wmb:eventPointData>
- <wmb:eventData wmb:productVersion="6103" wmb:eventSchemaVersion="6.1.0.3" wmb:eventSourceAddress="POC_Exception_Handling_Sub_MF.MQOutput.terminal.in">
  <wmb:eventIdentity wmb:eventName="MQOutput.InTerminal" />
  <wmb:eventSequence wmb:creationTime="2009-07-17T17:37:20.231" />
  <wmb:eventCorrelation wmb:localTransactionId="80eb8ef2-0106-478e-9360-f1cd077eac6f" wmb:parentTransactionId="54ef7b93-a18d-489c-a714-4a44123be5e9" wmb:globalTransactionId="27a91e0a-4cc3-4a26-9a75-5f7cac2290aa" />
  </wmb:eventData>
- <wmb:messageFlowData>
  <wmb:broker wmb:name="WBRK61_DEFAULT_BROKER" wmb:UUID="192100f4-2101-0000-0080-df72da808cd0" />
  <wmb:executionGroup wmb:name="default" wmb:UUID="d42100f4-2101-0000-0080-df72da808cd0" />
  <wmb:messageFlow wmb:uniqueFlowName="WBRK61_DEFAULT_BROKER.default.POC_Parent_MF" wmb:name="POC_Parent_MF" wmb:UUID="91260789-2201-0000-0080-cc66b4815e60" wmb:threadId="5632" />
  <wmb:node wmb:nodeLabel="POC_Exception_Handling_Sub_MF.MQOutput" wmb:nodeType="ComIbmMQOutputNode" wmb:terminal="in" />
  </wmb:messageFlowData>
  </wmb:eventPointData>
- <wmb:applicationData>
  <wmb:simpleContent wmb:name="TimeStamp" wmb:value="2009-07-17T13:37:20.230594" wmb:dataType="dateTime" />
  <wmb:simpleContent wmb:name="EventType" wmb:value="ERROR" wmb:dataType="string" />
  <wmb:simpleContent wmb:name="TargetApp" wmb:value="Billing" wmb:dataType="string" />
  <wmb:simpleContent wmb:name="QueueManager" wmb:value="WBRK61_DEFAULT_QUEUE_MANAGER" wmb:dataType="string" />
  <wmb:simpleContent wmb:name="TransId" wmb:value="newTest123" wmb:dataType="string" />
  <wmb:simpleContent wmb:name="ErrorText" wmb:value="-1 ABC Child SQL exception IM002 0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Caught exception and rethrowing. Root SQL exception. Child SQL exception." wmb:dataType="string" />
  <wmb:simpleContent wmb:name="ErrorSource" wmb:value="POC_Parent_MF.Compute" wmb:dataType="string" />
  <wmb:simpleContent wmb:name="ActualMessage" wmb:value="<ClaimInfo> <FirstName>Kishore Raju</FirstName> </ClaimInfo>" wmb:dataType="string" />
  <wmb:simpleContent wmb:name="SourceApp" wmb:value="Policy Managment system" wmb:dataType="string" />
  </wmb:applicationData>
- <wmb:bitstreamData>
- <wmb:bitstream wmb:encoding="CDATA">
- <![CDATA[ MD      "╡        AMQ WBRK61_DEFAUnü`J ½(                                                WBRK61_DEFAULT_QUEUE_MANAGER                    TE892       ài}EZ¡}Q+║¼.                                 C:\IH03\rfhutil.exe         2009071717371716        <ClaimInfo>
<FirstName>Kishore Raju</FirstName>
</ClaimInfo>



  ]]>
  </wmb:bitstream>
  </wmb:bitstreamData
Back to top
View user's profile Send private message
jbanoop
PostPosted: Fri Jul 17, 2009 10:14 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

...and what is the parsing error being thrown ?
Back to top
View user's profile Send private message Yahoo Messenger
kishoreraju
PostPosted: Fri Jul 17, 2009 11:13 am    Post subject: Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

Thanks for u r prompted response.

What should be CCSID that we need to use in XMLS to get this working.


The below is the error Message.

Code:
( WBRK61_DEFAULT_BROKER.default ) An XML parsing error ''An invalid XML character (Unicode: 0x2) was found in the CDATA section.'' occurred on line 6 column 215 when parsing element ''/Root/XMLNSC/http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event:event/http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event:bitstreamData/http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event:bitstream''.   
 Internal error codes are '1501' and '2'.   

This error was reported by the generic XML parser, and is usually the result of a badly formed XML message.   

Check that the input XML message is a well-formed XML message that adheres to the XML specification. The line number and column number that are quoted in the message give the position where the parser discovered the problem. However, the actual error might be earlier in the message.   
 Other possible causes are:   
 1. A character that is not supported by XML occurs in the instance message data.   
      XML supports only a subset of control characters; therefore, ensure that no unsupported characters, such as X'00', appear in the document.   
 2. The Coded Character Set ID that is defined in the message header does not reflect the contents of the instance message.   
      If the XML document has an XML prologue, the WebSphere MQ CodedCharSetId should be consistent with the XML Encoding field.   
 3. A reserved XML character appears in the instance message data.   
      Characters that might be recognized as XML markup - for example, < and & - should be replaced with the corresponding XML entities - &lt; and &amp;.


Thanks in advance.
Kishore.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Jul 17, 2009 1:09 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

The error message seems to complain about the CDATA section of the message.

Have you tried it with an empty cdata.

btw, I see that the CDATA is a binary archive of a WMQ MEssage. However, what are the empty lines at the end of the message?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kishoreraju
PostPosted: Mon Jul 20, 2009 7:41 am    Post subject: Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

Hi,

With the message broker event processing It supports 3 different types pays loads as a part of the event.

I am using CDATA type for adding the payload.This is built in feature in Message broker. i don't know why is giving an error.
Back to top
View user's profile Send private message
jbanoop
PostPosted: Mon Jul 20, 2009 7:57 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

It looks as if you are trying to place the whole message (including headers and everything) in the CDATA section.
The parser is behaving as it should, since I believe tht Unicode: 0x2 is not a valid character within an XML document (even inside the CDATA section).

I think you should look at the reason why this character is coming in the CDATA section.
Back to top
View user's profile Send private message Yahoo Messenger
mgk
PostPosted: Mon Jul 20, 2009 8:47 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

You should not be using CDATA to include non-XML payloads. You should use hexBinary or base64Binary in this case.

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
kishoreraju
PostPosted: Tue Jul 21, 2009 5:38 am    Post subject: Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

Hi mgk,

Thanks for u r Response,

In Message broker Monitoring we have option to Include bitstream data in paylod.By using this option we can only include whole message as payload. It did't have facility to add particular part of the message(like Body.. etc..).

So CDATA part in the above message is generated by the default functionality provided by the broker monitoring feature(it is not generated by using any esql or Java and there is no way for us to control it).

I tried using base64Binary encoding but i am not able to convert it back to character by using ESQL in the next flow because there is no compatable datatype in ESQL for base64 binary( think BLOB characterset is limited to A-F,0-9). I Can use a java function to covert the base64binary to character but i want try with the default functionality provided by broker first.

Please suggest me if there are any other option or I need open a PMR.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Jul 21, 2009 6:04 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Which version of Broker are you using? I believe the the choice of output types for bitstream data (hexbinary, base64 and cdata) are available in 6.1.0.3 or 6.1.0.4...
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
kishoreraju
PostPosted: Tue Jul 21, 2009 8:26 am    Post subject: Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

Thanks for u r quick response,

I am using message broker 6.1.0.4.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Jul 21, 2009 9:07 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

So when you add a monitoring event, at the bottom of the dialogue, there is a check box called "Include bitstream data in payload". When you tick this box, you need to change the Encoding dropdown next to it to be hexBinary or base64.
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
kishoreraju
PostPosted: Tue Jul 21, 2009 9:26 am    Post subject: Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

In what situations we can use CDATA Encoding in Include bitstream data in payload option.


From my uderstanding the in my i am getting an XML parsing error is beause of the Special characters in MQMD headers(In the CDATA) which is going to be identical for all other message formats(TDS,CWF and SOAP etc..).
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Jul 21, 2009 9:39 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

You can only use CDATA if the data in it is valid XML data. Othewise the data needs to be encoded in someway (hexBinary or base64). This is as per the XML spec...
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
kishoreraju
PostPosted: Tue Jul 21, 2009 11:04 am    Post subject: Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

I agree with you.

So with Message broker monitor events we can not include the message payload with encoding set to CDATA.(because payload always contains MQMD headers and alnog with the message.

CDATA option is not useful with message broker version 6.1.0.4.


I think i need to PMR with PMR about this.

correct me if i am wrong.
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Jul 21, 2009 11:48 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Well if you were using a none MQ Input node (e.g. HTTP or SOAP or File) then the message would not contain binary data so CDATA should work there...
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMB event monitoring generating invalid XML
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.