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 » XML tag is a number, fail to publish

Post new topic  Reply to topic
 XML tag is a number, fail to publish « View previous topic :: View next topic » 
Author Message
wilsonho3
PostPosted: Sun Sep 19, 2010 7:14 pm    Post subject: XML tag is a number, fail to publish Reply with quote

Voyager

Joined: 20 Nov 2001
Posts: 98
Location: Hong Kong

Hi, all

I have a XML parse issue in a publication node.

1. flow was deployed with following setting:

MQInput --> Compute --> Publisation

MQInput = a local queue on broker Qmanager, XMLNSC message domain

Compute = ESQL :
Code:
CREATE COMPUTE MODULE XML_PUB_Compute
 CREATE FUNCTION Main() RETURNS BOOLEAN
 BEGIN
  CALL CopyMessageHeaders();
  -- Set up the Publication
  SET OutputRoot.MQRFH2.psc.Command = 'Publish';
  SET OutputRoot.MQRFH2.psc.PubOpt = 'Local';
  SET OutputRoot.MQRFH2.psc.Topic = 
         'XML/'||InputRoot.XMLNSC.CXNOTOC.FLT.NUM;
  SET OutputRoot.XML = InputRoot.XMLNSC;
         RETURN TRUE;
 END;
 
 CREATE PROCEDURE CopyMessageHeaders() BEGIN
  DECLARE I INTEGER 1;
  DECLARE J INTEGER;
  SET J = CARDINALITY(InputRoot.*[]);
  WHILE I < J DO
   SET OutputRoot.*[I] = InputRoot.*[I];
   SET I = I + 1;
  END WHILE;
 END;
 
 CREATE PROCEDURE CopyEntireMessage() BEGIN
  SET OutputRoot = InputRoot;
 END;
END MODULE;


2. Write a XML file to local queue with following content:
<CXNOTOC>
<FLT>
<NUM>CX450</NUM>
<A>abc</A>
</FLT>
</CXNOTOC>

3. It successfully publish a Topic "XML/CX450

4. However, if the XML file contain a field which field named in a number, it will failed to publish (test.xml):
<CXNOTOC>
<FLT>
<NUM>CX450</NUM>
<1>abc</1>
</FLT>
</CXNOTOC>


What is wrong in the XML parser. and how should handle situation
like that, pls advise ??


this is the trace
--------------------


Timestamps are formatted in local time, 480 minutes past GMT.
Trace written by version ; formatter version 6103

Code:
2010-09-17 17:28:35.601080     8225   UserTrace   BIP4040I: The Execution Group ''Test_PubSub'' has processed a configuration message successfully.
                                       A configuration message has been processed successfully. Any configuration changes have been made and stored persistently.
                                       No user action required.
2010-09-17 17:28:35.601352     8225   UserTrace   BIP2638I: The MQ output node 'ConfigurationMessageFlow.outputNode' attempted to write a message to queue ''SYSTEM.BROKER.EXECUTIONGROUP.REPLY'' connected to queue manager ''BKQMD01''. The MQCC was '0' and the MQRC was '0'.
2010-09-17 17:28:35.601364     8225   UserTrace   BIP2622I: Message successfully output by output node 'ConfigurationMessageFlow.outputNode' to queue ''SYSTEM.BROKER.EXECUTIONGROUP.REPLY'' on queue manager ''BKQMD01''.
2010-09-17 17:28:35.601504     8225   Information  BIP2154I: Execution group finished with Configuration message.
                                       A command response will be sent to the broker.
                                       No user action required.
2010-09-17 17:28:57.562024     7315   UserTrace   BIP2632I: Message received and propagated to 'out' terminal of MQ input node 'XML_PUB.MQInput'.
2010-09-17 17:28:57.562112     7315   UserTrace   BIP6060I: Parser type ''Properties'' created on behalf of node 'XML_PUB.MQInput' to handle portion of incoming message of length 0 bytes beginning at offset '0'.
2010-09-17 17:28:57.562132     7315   UserTrace   BIP6061I: Parser type ''MQMD'' created on behalf of node 'XML_PUB.MQInput' to handle portion of incoming message of length '364' bytes beginning at offset '0'. Parser type selected based on value ''MQHMD'' from previous parser.
2010-09-17 17:28:57.562180     7315   UserTrace   BIP6061I: Parser type ''XMLNSC'' created on behalf of node 'XML_PUB.MQInput' to handle portion of incoming message of length '72' bytes beginning at offset '364'. Parser type selected based on value ''XMLNSC'' from previous parser.
2010-09-17 17:28:57.562220     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''BEGIN ... END;'' at ('.XML_PUB_Compute.Main', '2.2').
2010-09-17 17:28:57.562256     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''CopyMessageHeaders();'' at ('.XML_PUB_Compute.Main', '3.3').
2010-09-17 17:28:57.562276     7315   UserTrace   BIP2538I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''CopyMessageHeaders()'' at ('.XML_PUB_Compute.Main', '3.8').
2010-09-17 17:28:57.562304     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''BEGIN ... END;'' at ('.XML_PUB_Compute.CopyMessageHeaders', '1.40').
2010-09-17 17:28:57.562328     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''DECLARE I INTEGER 1;'' at ('.XML_PUB_Compute.CopyMessageHeaders', '2.3').
2010-09-17 17:28:57.562352     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''DECLARE J INTEGER;'' at ('.XML_PUB_Compute.CopyMessageHeaders', '3.3').
2010-09-17 17:28:57.562376     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''SET J = CARDINALITY(InputRoot.*:*[ ]);'' at ('.XML_PUB_Compute.CopyMessageHeaders', '4.3').
2010-09-17 17:28:57.562440     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''InputRoot.*:*[ ]'' at ('.XML_PUB_Compute.CopyMessageHeaders', '4.23'). This resolved to ''InputRoot.*:*[]''. The result was ''LIST... First Element Type=16777216 NameSpace='' Name='Properties' Value=NULL''.
2010-09-17 17:28:57.562460     7315   UserTrace   BIP2540I: Node 'XML_PUB.XML_PUB_Compute': Finished evaluating expression ''CARDINALITY(InputRoot.*:*[ ])'' at ('.XML_PUB_Compute.CopyMessageHeaders', '4.11'). The result was ''3''.
2010-09-17 17:28:57.562480     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''WHILE I < J DO ... END WHILE;'' at ('.XML_PUB_Compute.CopyMessageHeaders', '5.3').
2010-09-17 17:28:57.562500     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '5.9'). This resolved to ''I''. The result was ''1''.
2010-09-17 17:28:57.562524     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''J'' at ('.XML_PUB_Compute.CopyMessageHeaders', '5.13'). This resolved to ''J''. The result was ''3''.
2010-09-17 17:28:57.562548     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I < J'' at ('.XML_PUB_Compute.CopyMessageHeaders', '5.9'). This resolved to ''1 < 3''. The result was ''TRUE''.
2010-09-17 17:28:57.562588     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''SET OutputRoot.*:*[I] = InputRoot.*:*[I];'' at ('.XML_PUB_Compute.CopyMessageHeaders', '6.4').
2010-09-17 17:28:57.562612     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '6.38'). This resolved to ''I''. The result was ''1''.
2010-09-17 17:28:57.562628     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '6.38'). This resolved to ''I''. The result was ''1''.
2010-09-17 17:28:57.562652     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''InputRoot.*:*[I]'' at ('.XML_PUB_Compute.CopyMessageHeaders', '6.26'). This resolved to ''InputRoot.*:*[1]''. The result was ''ROW... Root Element Type=16777216 NameSpace='' Name='Properties' Value=NULL''.
2010-09-17 17:28:57.562676     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '6.21'). This resolved to ''I''. The result was ''1''.
2010-09-17 17:28:57.562692     7315   UserTrace   BIP2568I: Node 'XML_PUB.XML_PUB_Compute': Copying sub-tree from ''InputRoot.*:*[I]'' to ''OutputRoot.*:*[I]''.
2010-09-17 17:28:57.562736     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''SET I = I + 1;'' at ('.XML_PUB_Compute.CopyMessageHeaders', '7.4').
2010-09-17 17:28:57.562756     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '7.12'). This resolved to ''I''. The result was ''1''.
2010-09-17 17:28:57.562780     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I + 1'' at ('.XML_PUB_Compute.CopyMessageHeaders', '7.14'). This resolved to ''1 + 1''. The result was ''2''.
2010-09-17 17:28:57.562792     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '5.9'). This resolved to ''I''. The result was ''2''.
2010-09-17 17:28:57.562808     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''J'' at ('.XML_PUB_Compute.CopyMessageHeaders', '5.13'). This resolved to ''J''. The result was ''3''.
2010-09-17 17:28:57.562828     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I < J'' at ('.XML_PUB_Compute.CopyMessageHeaders', '5.9'). This resolved to ''2 < 3''. The result was ''TRUE''.
2010-09-17 17:28:57.562848     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''SET OutputRoot.*:*[I] = InputRoot.*:*[I];'' at ('.XML_PUB_Compute.CopyMessageHeaders', '6.4').
2010-09-17 17:28:57.562868     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '6.38'). This resolved to ''I''. The result was ''2''.
2010-09-17 17:28:57.562884     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '6.38'). This resolved to ''I''. The result was ''2''.
2010-09-17 17:28:57.562916     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''InputRoot.*:*[I]'' at ('.XML_PUB_Compute.CopyMessageHeaders', '6.26'). This resolved to ''InputRoot.*:*[2]''. The result was ''ROW... Root Element Type=16777216 NameSpace='' Name='MQMD' Value=NULL''.
2010-09-17 17:28:57.562940     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '6.21'). This resolved to ''I''. The result was ''2''.
2010-09-17 17:28:57.562960     7315   UserTrace   BIP2568I: Node 'XML_PUB.XML_PUB_Compute': Copying sub-tree from ''InputRoot.*:*[I]'' to ''OutputRoot.*:*[I]''.
2010-09-17 17:28:57.562984     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''SET I = I + 1;'' at ('.XML_PUB_Compute.CopyMessageHeaders', '7.4').
2010-09-17 17:28:57.563004     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '7.12'). This resolved to ''I''. The result was ''2''.
2010-09-17 17:28:57.563024     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I + 1'' at ('.XML_PUB_Compute.CopyMessageHeaders', '7.14'). This resolved to ''2 + 1''. The result was ''3''.
2010-09-17 17:28:57.563036     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I'' at ('.XML_PUB_Compute.CopyMessageHeaders', '5.9'). This resolved to ''I''. The result was ''3''.
2010-09-17 17:28:57.563052     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''J'' at ('.XML_PUB_Compute.CopyMessageHeaders', '5.13'). This resolved to ''J''. The result was ''3''.
2010-09-17 17:28:57.563076     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''I < J'' at ('.XML_PUB_Compute.CopyMessageHeaders', '5.9'). This resolved to ''3 < 3''. The result was ''FALSE''.
2010-09-17 17:28:57.563104     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''SET OutputRoot.MQRFH2.psc.Command = 'Publish';'' at ('.XML_PUB_Compute.Main', '5.3').
2010-09-17 17:28:57.563144     7315   UserTrace   BIP2566I: Node 'XML_PUB.XML_PUB_Compute': Assigning value       '''Publish''' to field / variable ''OutputRoot.MQRFH2.psc.Command''.
2010-09-17 17:28:57.563168     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''SET OutputRoot.MQRFH2.psc.PubOpt = 'Local';'' at ('.XML_PUB_Compute.Main', '6.3').
2010-09-17 17:28:57.563192     7315   UserTrace   BIP2566I: Node 'XML_PUB.XML_PUB_Compute': Assigning value       '''Local''' to field / variable ''OutputRoot.MQRFH2.psc.PubOpt''.
2010-09-17 17:28:57.563212     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''SET OutputRoot.MQRFH2.psc.Topic = 'XML/' || InputRoot.XMLNSC.CXNOTOC.FLT.NUM;'' at ('.XML_PUB_Compute.Main', '7.3').
2010-09-17 17:28:57.563308     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression ''InputRoot.XMLNSC.CXNOTOC.FLT.NUM'' at ('.XML_PUB_Compute.Main', '7.45'). This resolved to ''InputRoot.XMLNSC.CXNOTOC.FLT.NUM''. The result was '''CX450'''.
2010-09-17 17:28:57.563336     7315   UserTrace   BIP2539I: Node 'XML_PUB.XML_PUB_Compute': Evaluating expression '''XML/' || InputRoot.XMLNSC.CXNOTOC.FLT.NUM'' at ('.XML_PUB_Compute.Main', '7.43'). This resolved to '''XML/' || 'CX450'''. The result was '''XML/CX450'''.
2010-09-17 17:28:57.563360     7315   UserTrace   BIP2566I: Node 'XML_PUB.XML_PUB_Compute': Assigning value       '''XML/CX450''' to field / variable ''OutputRoot.MQRFH2.psc.Topic''.
2010-09-17 17:28:57.563388     7315   UserTrace   BIP2537I: Node 'XML_PUB.XML_PUB_Compute': Executing statement   ''SET OutputRoot.XML = InputRoot.XMLNSC;'' at ('.XML_PUB_Compute.Main', '8.3').
2010-09-17 17:28:57.563464     7315   UserTrace   BIP5004E: An XML parsing error ''The content of elements must consist of well-formed character data or markup.'' occurred on line 4 column 3 when parsing element ''/Root/XMLNSC/CXNOTOC/FLT''.  Internal error codes are '1519' 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;.
2010-09-17 17:28:57.564424     7315   Error       BIP2628E: Exception condition detected on input node 'XML_PUB.MQInput'.
                                       The input node 'XML_PUB.MQInput' 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.
2010-09-17 17:28:57.564432     7315   RecoverableException  BIP2230E: Error detected whilst processing a message in node 'XML_PUB.XML_PUB_Compute'.
                                       The message broker detected an error whilst processing a message in node 'XML_PUB.XML_PUB_Compute'. An exception has been thrown to cut short the processing of the message.
                                       See the following messages for details of the error.
2010-09-17 17:28:57.564436     7315   RecoverableException  BIP2488E:  ('.XML_PUB_Compute.Main', '8.3') Error detected whilst executing the SQL statement ''SET OutputRoot.XML = InputRoot.XMLNSC;''.
                                       The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
                                       See the following messages for details of the error.
2010-09-17 17:28:57.564436     7315   ParserException  BIP5009E: XML Parsing Errors have occurred.
                                       Errors have occurred during parsing of XML.
                                       Review further error messages for an indication to the cause of the errors.
2010-09-17 17:28:57.564444     7315   ParserException  BIP5004E: An XML parsing error ''The content of elements must consist of well-formed character data or markup.'' occurred on line 4 column 3 when parsing element ''/Root/XMLNSC/CXNOTOC/FLT''.  Internal error codes are '1519' 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;.
2010-09-17 17:28:58.564896     7315   Error       BIP2648E: Message backed out to a queue; node 'XML_PUB.MQInput'.
                                       Node 'XML_PUB.MQInput' has received a message which has previously been backed out one or more times because of a processing error in the main path of the message flow. The failure terminal is not attached, so the message broker is putting the message directly to the requeue or dead letter backout queue associated with this node. The MQMD 'backoutCount' of the message now equals the 'backoutThreshold' defined for the WebSphere MQ input queue.
                                       Examine previous messages and the message flow to determine why the message is being backed out.  Correct this situation if possible.  Perform any local error recovery processing required.
2010-09-17 17:28:58.565196     7315   UserTrace   BIP2638I: The MQ output node 'XML_PUB.MQInput' attempted to write a message to queue ''BKQMD01_DLQ'' connected to queue manager ''BKQMD01''. The MQCC was '0' and the MQRC was '0'.
2010-09-17 17:28:58.565224     7315   UserTrace   BIP2615I: The WebSphere MQ input node 'XML_PUB.MQInput' 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 WebSphere MQ queue manager and queue configuration.
                                       No user action required.
2010-09-17 17:29:16.068762     8225   UserTrace   BIP2632I: Message received and propagated to 'out' terminal of MQ input node 'ConfigurationMessageFlow.InputNode'.
2010-09-17 17:29:16.068867     8225   UserTrace   BIP6060I: Parser type ''Properties'' created on behalf of node 'ConfigurationMessageFlow.InputNode' to handle portion of incoming message of length 0 bytes beginning at offset '0'.
2010-09-17 17:29:16.068893     8225   UserTrace   BIP6061I: Parser type ''MQMD'' created on behalf of node 'ConfigurationMessageFlow.InputNode' to handle portion of incoming message of length '364' bytes beginning at offset '0'. Parser type selected based on value ''MQHMD'' from previous parser.
2010-09-17 17:29:16.068968     8225   UserTrace   BIP6061I: Parser type ''XMLS'' created on behalf of node 'ConfigurationMessageFlow.InputNode' to handle portion of incoming message of length '209' bytes beginning at offset '364'. Parser type selected based on value ''XMLS'' from previous parser.
2010-09-17 17:29:16.069174     8225   Information  BIP2152I: Configuration message received from broker.
                                       An execution group received a command from the Broker.
                                       No user action required.
2010-09-17 17:29:16.069288     8225   Information  BIP2153I: About to ''change'' an execution group.
                                       An execution group is about to perform an action.
                                       No user action required.

Threads encountered in this trace:
  7315  8225
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Sun Sep 19, 2010 8:41 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20703
Location: LI,NY

Your error and the way to handle it is in the trace:
Quote:
OutputRoot.XML = InputRoot.XMLNSC;'' at ('.XML_PUB_Compute.Main', '8.3').
2010-09-17 17:28:57.563464 7315 UserTrace BIP5004E: An XML parsing error ''The content of elements must consist of well-formed character data or markup.'' occurred on line 4 column 3 when parsing element ''/Root/XMLNSC/CXNOTOC/FLT''. Internal error codes are '1519' 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;.
2010-09-17 17:28:57.564424 7315 Error BIP2628E: Exception condition detected on input node 'XML_PUB.MQInput'.
The input node 'XML_PUB.MQInput' 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.


So you have multiple strikes against you:


Quote:
OutputRoot.XML = InputRoot.XMLNSC;

You should have used OutputRoot.XMLNSC. This makes things so much easier, especially if you have attributes and other stuff to handle.

Kimbert will tell you that the XML domain is deprecated...

As for the other stuff (CCSID), I don't see you setting it anywhere. Maybe it needs to be set explicitly to CCSID 1208 (UTF-8 ).
And I would expect you to set it explicitly on the Properties, the MQMD and on both parts of the MQRFH2...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
wilsonho3
PostPosted: Mon Sep 20, 2010 12:51 am    Post subject: Reply with quote

Voyager

Joined: 20 Nov 2001
Posts: 98
Location: Hong Kong

Just reply by IBM numeric tag is not support for XML parser.

A valid name used in a tag must be started with letters (including non-Latin characters) or the dash (-), but not numbers or other punctuation characters. So <1> </1> is not a valid tag and the error BIP5004E reflects this.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon Sep 20, 2010 1:17 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I noticed this line in your ESQL:
Code:
SET OutputRoot.XML = InputRoot.XMLNSC;

Is there a reason why why you are changing the domain from XMLNSC to XML?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Sep 20, 2010 1:35 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

wilsonho3 wrote:
Just reply by IBM numeric tag is not support for XML parser.

A valid name used in a tag must be started with letters (including non-Latin characters) or the dash (-), but not numbers or other punctuation characters. So <1> </1> is not a valid tag and the error BIP5004E reflects this.


To be clear, this is not the XML parser that does not support this. It's the XML Specification that does not allow this.

http://www.w3.org/TR/xml11/#NT-NameStartChar
Back to top
View user's profile Send private message
wilsonho3
PostPosted: Mon Sep 20, 2010 1:41 am    Post subject: Reply with quote

Voyager

Joined: 20 Nov 2001
Posts: 98
Location: Hong Kong

change to this even can not publish message



Compute = ESQL :
CREATE COMPUTE MODULE XML_PUB_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
-- Set up the Publication
CREATE NEXTSIBLING OF OutputRoot.MQMD NAME 'MQRFH2';
SET OutputRoot.MQMD.CodedCharSetId = '1208';
SET OutputRoot.MQMD.Format = 'MQHRF2';
SET OutputRoot.MQRFH2.Version = '2';
SET OutputRoot.MQRFH2.Format = InputRoot.MQMD.Format;
SET OutputRoot.MQRFH2.Encoding= InputRoot.MQMD.Encoding;
SET OutputRoot.MQRFH2.CodedCharSetId = InputRoot.MQMD.CodedCharSet
SET OutputRoot.MQRFH2.Flags = '0';
SET OutputRoot.MQRFH2.NameValueCCSID = '1208';

SET OutputRoot.MQRFH2.psc.Command = 'Publish';
SET OutputRoot.MQRFH2.psc.PubOpt = 'Local';
SET OutputRoot.MQRFH2.psc.Topic = 'XML/'||InputRoot.XMLNSC.CXNOTOC.FLT.NUM;
-- SET OutputRoot.XML = InputRoot.XMLNSC;
SET OutputRoot.XMLNSC = InputRoot.XMLNSC;

RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Sep 20, 2010 1:44 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

WHY are you enclosing a NUMERIC value in QUOTES?

CCSIDs are INTEGERs. DO NOT USE ''.
Back to top
View user's profile Send private message
wilsonho3
PostPosted: Mon Sep 20, 2010 1:47 am    Post subject: Reply with quote

Voyager

Joined: 20 Nov 2001
Posts: 98
Location: Hong Kong

I know, correct all the numeric field with no ' ', still not work. no
publish
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon Sep 20, 2010 1:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
change to this even can not publish message
We cannot help you unless you describe the problem. Please quote the error messge that you are getting.

Did you change the XML to remove the illegal <1> tag?
Back to top
View user's profile Send private message
wilsonho3
PostPosted: Mon Sep 20, 2010 1:49 am    Post subject: Reply with quote

Voyager

Joined: 20 Nov 2001
Posts: 98
Location: Hong Kong

I ask users to change to


<group-item>
<a>ddd</a>
<b>ddd</b>
....
</group-item>

it works. ths
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML tag is a number, fail to publish
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.