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 Parsing issue

Post new topic  Reply to topic
 XML Parsing issue « View previous topic :: View next topic » 
Author Message
smeunier
PostPosted: Thu Jan 17, 2008 6:56 am    Post subject: XML Parsing issue Reply with quote

Partisan

Joined: 19 Aug 2002
Posts: 305
Location: Green Mountains of Vermont

Thanks for taking the time to look at this.......

The Environment is: WBIMB V6.0.0.3
MQ V6.0.2.0

Operating System is AIX V5.3.0.0

The problem:

I receive messages the same message from both OS/390 and LINUX and AIX environment. Parsin of the XML message is good from both Linux and AIX. From OS/390, I have issue accessig the XML.CDataSection, I can access any XML.Attribute, but not the CDataSection. It renders a blank in the assignment field, only when the message is coming from OS/390. The XML structure, when viewed from the Debugger is good.

There are 2 message flows involved, one for messages coming from OS/390, which merely receives the message, with convert option and puts message to a common queue(where Linux and AIX messages are sent to). The second message flow does the actual parsing and procesing o the message. As I have mentioned, when coming from Linux and AIX, I can get the XML.CDataSection value, but when the message comes from OS/390, I cannot get the value. All other attributes of the XML structure are addressable!

Any Ideas what the issue may be? I have been working this for quite a while and have dead ended.

This is a sample of the XML:
Code:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE EVENT[ ]>
<EVENT>
  <LOG ID="TEST" TIMESTAMP="1172506701" LEVEL="I"><![CDATA[Elapsed Time=00000009ms Event=DLVR  Status=SUCCESS]]</LOG>
</EVENT>


This is an example of the ESQL:
Code:

SET id  = InputRoot.XML.(XML.Element)EVENT.(XML.Element)LOG[1].(XML.Attribute)ID;
    SET msg = InputRoot.XML.(XML.Element)EVENT.(XML.Element)LOG[1].(XML.CDataSection)*;   


Any help or thoughts would be much appreciated.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jan 17, 2008 7:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Please don't use the XML Domain.

What does it mean "when the message comes from OS/390, I cannot get the value"? What data do you get, what errors if any are thrown?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jan 17, 2008 7:19 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

- Your CData section should end with >. I presume that was a typo.
- Please switch to XMLNS or XMLNSC as soon as possible.
- I would expect the following code to work ( not tested ) . Your message flow should not care about how the value is rendered in the XML ( PCData or CData ).
Code:
SET msg = FIELDVALUE(InputRoot.XML.(XML.Element)EVENT.(XML.Element)LOG[1]);
Back to top
View user's profile Send private message
smeunier
PostPosted: Thu Jan 17, 2008 7:55 am    Post subject: Reply with quote

Partisan

Joined: 19 Aug 2002
Posts: 305
Location: Green Mountains of Vermont

Reply to Jeffs posting............. It means I get nothing. If I initialize it to blank, after the statement is executed I still have a blank. no error is thrown or detected in the logs.
Back to top
View user's profile Send private message
smeunier
PostPosted: Thu Jan 17, 2008 8:40 am    Post subject: Reply with quote

Partisan

Joined: 19 Aug 2002
Posts: 305
Location: Green Mountains of Vermont

The CDATA tag was a typo......

I switched Input Node Domain to XMLNSC from XML

I switched ESQL to:


SET id = FIELDVALUE(InputRoot.XMLNSC.EVENT.LOG[1].ID);
SET msg = FIELDVALUE(InputRoot.XMLNSC.EVENT.LOG[1]);

I had to remove the XML.Attribute, and castings in order for it to work. I'm able to receive the data from OS/390 "msg" data in the XML's CDataSection ok now. I'm not sure I understand why XMLNSC would resolve this quirk. But am glad with a solution.[/code]
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jan 18, 2008 1:51 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
had to remove the XML.Attribute, and castings in order for it to work.
Well, you didn't try to use XML.Attribute with the XMLNSC domain, did you
XMLNSC has its own set of field type constants ( XMLNSC.Attribute, XMLNSC.Element, XMLNSC.PCDataField ... ). There are examples in the docs if you want to know more.
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 » XML Parsing issue
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.