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 IndexWebSphere Message Broker (ACE) SupportXML tag creation problem

Post new topicReply to topic
XML tag creation problem View previous topic :: View next topic
Author Message
JustFriend
PostPosted: Sun Jul 10, 2005 9:11 am Post subject: XML tag creation problem Reply with quote

Novice

Joined: 30 May 2005
Posts: 22

HELP REQUEST:

XML Node problem... Requesting help.

Please find below the code I am using. I am unable to find where is the error.

Requesing your help.
Best Regards,
Just Friend.



_______________________________________________________________________
ESQL:


CALL CopyMessageHeaders();
SET OutputRoot.Properties.MessageDomain = 'XML';
SET OutputRoot.Properties.MessageFormat = 'XML';
SET OutputRoot.Properties.MessageSet = '';
SET OutputRoot.Properties.MessageType = '';
SET OutputRoot.Properties.MessageFormat = 'MQSTR';
SET OutputRoot.Properties.Encoding = 546;
SET OutputRoot.Properties.CodedCharSetId = 437;
SET OutputRoot.XML.(XML.XmlDecl) = '';
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) = '1.0';
SET OutputRoot.XML.(XML.XmlDecl).(XML."Encoding") = 'UTF-8';

SET OutputRoot.XML.(XML.DocTypeDecl)MYSERVICE = '';
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId) = './MYSERVICE.DTD';

-- When I add the below statement, I am getting errors
-- (BIPv500 - No valid body of the document could be found) and
-- it goes to the error terminal of the MQOutput Node.

SET OutputRoot.XML.(XML.Element)MSGTYPE = 'something';

SET OutputRoot.XML.(XML.Element)MYSERVICE.QUERY.CODE = 'CODEX';
SET OutputRoot.XML.(XML.Element)MYSERVICE.QUERY.REF = 'REF001';
SET OutputRoot.XML.(XML.Element)MYSERVICE.QUERY.TITLE = 'TEST';
SET OutputRoot.XML.(XML.Element)MYSERVICE.QUERY.NUMBER = '001';

_______________________________________________________________________
THE ABOVE CODE GIVES ME THE FOLLOWING OUTPUT XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MYSERVICE SYSTEM "./MYSERVICE.DTD">
<MYSERVICE>
<QUERY>
<CODEX>MB</CODEX>
<REF>301862</REF>
<TITLE>MB</TITLE>
<NUMBER>5012138611101</NUMBER>
</QUERY>
</MYSERVICE>
_______________________________________________________________________
If I ADD a node under "MYSERVICE" the message goes fine

BUT, I want another XML-node like "MYSERVICE" called as "MSGTYPE" and the expected output is like the below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MYSERVICE SYSTEM "./MYSERVICE.DTD">
<MSGTYPE>something</MSGTYPE>
<MYSERVICE>
<QUERY>
<CODEX>MB</CODEX>
<REF>301862</REF>
<TITLE>MB</TITLE>
<NUMBER>5012138611101</NUMBER>
</QUERY>
</MYSERVICE>

_______________________________________________________________________

TRACE:




############### START #################


ROOT:
====
(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = 'MQSTR'
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2005-07-10 17:00:35.950'
(0x03000000):ExpirationTime = GMTTIMESTAMP '2005-07-10 17:08:55.951007'
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'414d5120534242424b31514d2020202012a4be422000a22c'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'INT.TRA.REQ.IN'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = 'MQSTR '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = GMTTIMESTAMP '2005-07-10 17:08:55.951007'
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d5120534242424b31514d2020202012a4be422000a22c'
(0x03000000):CorrelId = X'414d5120534242424b31514d2020202012a4be422000a22c'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'SBBBK1QM '
(0x03000000):UserIdentifier = 'SYSTEM '
(0x03000000):AccountingToken = X'060101120000000000000000000000000000000000000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = 'C:\WINDOWS\system32\java.exe'
(0x03000000):PutDate = DATE '2005-07-10'
(0x03000000):PutTime = GMTTIME '17:00:35.950'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000010):XML = (
(0x05000018): = (
(0x02000000): = ''
(0x06000011): = '1.0'
(0x06000012): = 'UTF-8'
)
(0x05000020):MYSERVICE = (
(0x02000000): = ''
(0x06000008): = './MYSERVICE.DTD'
)
(0x01000000):MSGTYPE = (
(0x02000000): = 'something'
)
(0x01000000):MYSERVICE = (
(0x01000000):QUERY = (
(0x01000000):CODE = (
(0x02000000): = 'CODEX'
)
(0x01000000):REF = (
(0x02000000): = 'REF001'
)
(0x01000000):TITLE = (
(0x02000000): = 'TEST'
)
(0x01000000):NUMBER = (
(0x02000000): = '001'
)
)
)
)
)


EXCEPTION:
========
(
(0x01000000):RecoverableException = (
(0x03000000):File = 'F:\build\S500_P\src\DataFlowEngine\ImbDataFlowNode.cpp'
(0x03000000):Line = 558
(0x03000000):Function = 'ImbDataFlowNode::createExceptionList'
(0x03000000):Type = 'ComIbmMQOutputNode'
(0x03000000):Name = 'INT_REQ_ROUTER#FCMComposite_1_6.INT_TBAL_REQ#FCMComposite_1_3'
(0x03000000):Label = 'INT_REQ_ROUTER.INT.FCC.IN'
(0x03000000):Text = 'Node throwing exception'
(0x03000000):Catalog = 'BIPv500'
(0x03000000):Severity = 3
(0x03000000):Number = 2230
(0x01000000):ParserException = (
(0x03000000):File = 'F:\build\S500_P\src\MTI\MTIforBroker\GenXmlParser2\XmlImbParser.cpp'
(0x03000000):Line = 313
(0x03000000):Function = 'XmlImbParser::refreshBitStreamFromElements'
(0x03000000):Type = 'ComIbmMQInputNode'
(0x03000000):Name = 'INT_REQ_ROUTER#FCMComposite_1_1'
(0x03000000):Label = 'INT_REQ_ROUTER.INT.TRA.REQ.IN'
(0x03000000):Text = 'XML Writing Errors have occurred'
(0x03000000):Catalog = 'BIPv500'
(0x03000000):Severity = 3
(0x03000000):Number = 5010
(0x01000000):ParserException = (
(0x03000000):File = 'F:\build\S500_P\src\MTI\MTIforBroker\GenXmlParser2\XmlImbParser.cpp'
(0x03000000):Line = 644
(0x03000000):Function = 'XmlImbParser::checkForBodyElement'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Text = 'No valid body of the document could be found.'
(0x03000000):Catalog = 'BIPv500'
(0x03000000):Severity = 3
(0x03000000):Number = 5005
)
)
)
)

############### E N D ##################
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
JT
PostPosted: Sun Jul 10, 2005 10:13 am Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Quote:
BUT, I want another XML-node like "MYSERVICE" called as "MSGTYPE" and the expected output is like the below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MYSERVICE SYSTEM "./MYSERVICE.DTD">
<MSGTYPE>something</MSGTYPE>
<MYSERVICE>
<QUERY>
<CODEX>MB</CODEX>
<REF>301862</REF>
<TITLE>MB</TITLE>
<NUMBER>5012138611101</NUMBER>
</QUERY>
</MYSERVICE>

Okay, you now have two siblings, MSGTYPE and MYSERVICE, but where's the parent tag? If you were to open the XML document you produced in a browser session, you'd get the following message:

Quote:
Only one top level element is allowed in an XML document

So, you need something like this:
Code:
SET OutputRoot.XML.ParentTag.MSGTYPE = 'something';

SET OutputRoot.XML.ParentTag.MYSERVICE.QUERY.CODE = 'CODEX';
SET OutputRoot.XML.ParentTag.MYSERVICE.QUERY.REF = 'REF001';
SET OutputRoot.XML.ParentTag.MYSERVICE.QUERY.TITLE = 'TEST';
SET OutputRoot.XML.ParentTag.MYSERVICE.QUERY.NUMBER = '001';
Back to top
View user's profile Send private message
JustFriend
PostPosted: Sun Jul 10, 2005 9:11 pm Post subject: Reply with quote

Novice

Joined: 30 May 2005
Posts: 22

Thanks JT for finding the error and immediate response.

It was a right-response at the right-time. Thanks a lot.

Actually, this format was given to us by one of the top software companies. Since the xml-format came from them, we thought they are (always) right and we were trying our best to send a message in their format. And our mistake was - we did not cross-check their message format. This proves that the so called “biggies” can also make mistakes.

ANOTHER GENERAL QUESTION:
How to post the message with white-background (box) as you have done above?

I am not an expert in MQSeries BUT whenever I find a solution, I try to post it for the benefit of others and the CODES will have better readability with white background.

If this is not the right-forum, I request your guidance to the appropriate-forum.

Best Regards,
Just Friend.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
fschofer
PostPosted: Mon Jul 11, 2005 1:47 am Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
Quote:
ANOTHER GENERAL QUESTION:
How to post the message with white-background (box) as you have done above?

select the text you want to highlight and click on the Quote or Code button above the edit field.

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
JustFriend
PostPosted: Mon Jul 11, 2005 2:32 am Post subject: Reply with quote

Novice

Joined: 30 May 2005
Posts: 22

Thanks Frank....

Now I got the trick...

Quote:
Here My Quote Msg

AND

Code:
Here My Code Msg...


Thanks a lot....
_________________
Best Regards,
Just Friend.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
JT
PostPosted: Mon Jul 11, 2005 5:26 am Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Also.....

http://www.mqseries.net/phpBB2/faq.php?mode=bbcode
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportXML tag creation problem
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.