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 » unreadable XML tree when DocType = RootElement

Post new topic  Reply to topic
 unreadable XML tree when DocType = RootElement « View previous topic :: View next topic » 
Author Message
damianharvey
PostPosted: Wed Jan 14, 2004 6:09 pm    Post subject: unreadable XML tree when DocType = RootElement Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

We have been given some sample XML messages from our client that they will be passing to us. When I tried to run these through our flows (MsgBrkv5.0) the message would parse ok and in the debugger I could see the tree and it looked fine.

However when I tried to reference a field in ESQL it could not find anything and would assume a null.

I traced the problem back to the fact that the DocType of the XML message was present but without a DTD. eg:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE Message>
<Message><Route><Sender>.....etc...etc...

Changing the DocType to anything else (eg. MESSAGE or Massage) or deleting it meant that the tree could be read ok and the flow worked.

Has anyone seen this? Is it logical for the Broker to behave like this when a DTD is not present for 'Message'? How would you treat this even if the DTD did exist? - ie. how would the broker pick up the DTD (given that this is not using the MRM parser)

Thanks,

Damian.
Back to top
View user's profile Send private message
kirani
PostPosted: Wed Jan 14, 2004 11:55 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Can you post your ESQL coe where you are trying to refer to this element?
_________________
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
View user's profile Send private message Visit poster's website
damianharvey
PostPosted: Thu Jan 15, 2004 11:45 am    Post subject: Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

Here's the relevant section of ESQL. With the DocType set to 'Message' and no DTD specified the lines referencing InputBody fail.

-----------------------------------------------

CREATE COMPUTE MODULE F01_RI_HANDLER
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
SET OutputLocalEnvironment = InputLocalEnvironment;

DECLARE line_feed BLOB CAST('0A' AS BLOB);

SET OutputRoot.Properties.MessageSet = 'K27R4V0002001';
SET OutputRoot.Properties.MessageType = 'TNT_FLAT_MSG';
SET OutputRoot.Properties.MessageFormat = 'TDS1';

SET OutputRoot.MRM.META_Msg.meta_header = 'MD';
SET OutputRoot.MRM.META_Msg.message_type = 'RI ';
SET OutputRoot.MRM.META_Msg.process_key = InputBody.Message.Route.Sender.Process;
SET OutputRoot.MRM.META_Msg.LF = line_feed;

SET OutputRoot.MRM.TNT_Msg.RI_Msg.record_indicator = 'HH';
SET OutputRoot.MRM.TNT_Msg.RI_Msg.order_type = TRIM(InputBody.Message.ReceivingInstruction.OrderType);
SET OutputRoot.MRM.TNT_Msg.RI_Msg.cust_order_number = TRIM(InputBody.Message.ReceivingInstruction.OrderNo);
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 » unreadable XML tree when DocType = RootElement
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.