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 » General Discussion » XML Attribute in ESQL (wbimb6.0)

Post new topic  Reply to topic
 XML Attribute in ESQL (wbimb6.0) « View previous topic :: View next topic » 
Author Message
mvs
PostPosted: Fri Jul 06, 2007 12:42 am    Post subject: XML Attribute in ESQL (wbimb6.0) Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Hi,
I am facing XML attribute problem.the below ESQL statement

SET OutputRoot.MRM.MM.(XML.Attribute)id ='HOLD1';
SET OutputRoot.MRM.MM.HoldingKey ='10001733';

here id is an attribute of MM but its getting element(child) of MM as output.

The output
---------
<MM><id>HOLD1</id><HoldingKey>10001733</HoldingKey></MM>

Any suggestions regarding this.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 06, 2007 12:49 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

You're using the MRM domain. Are you sure this is defined as an attribute?

The (XML.Attribute) construct is more associated with the XMLNS & XMLNSC domains in my experience.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jul 06, 2007 1:28 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

(XML.Attribute) is only valid against XML and XMLNS domains. In XMLNSC domain, you need to use (XMLNSC.Attribute).

In MRM, you need to use nothing, and configure the physical properties of the field to output as an element.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mvs
PostPosted: Fri Jul 06, 2007 5:06 am    Post subject: XML Attribute in ESQL (wbimb6.0) Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Thanks for the help.Now its working.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 06, 2007 5:15 am    Post subject: Re: XML Attribute in ESQL (wbimb6.0) Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mvs wrote:
Thanks for the help.Now its working.


Please post how you fixed it for the benefit of future generations.

But well done you!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mvs
PostPosted: Tue Jul 10, 2007 3:24 am    Post subject: XML Attribute in ESQL (wbimb6.0) Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Actually i am defining the the XML elements and attributes in 1st compute node.
in 2nd Compute Node,
I am assigning entair output message of computeNode1 to one element of the computenode node2. I found that while assigning the output message of computenode 1 to elemnt in 2nd computeNode its considering attributes as elements.
but outputmessage of computenode1 is correct(i mean it is taking elements and attributes).


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

SET OutputRoot.Properties.MessageSet='JM30L2O002001';
SET OutputRoot.Properties.MessageFormat='XML';
SEt OutputRoot.Properties.MessageType='Envelope';
SET Environment.Variables.msgchar = InputRoot.XML;
SET OutputRoot.MRM.soap:Body.RequestTaxYears.node=Environment.Variables.msgchar;
---------------

Now i changed the my code to

SET Environment.Variables.msgchar = CAST (InputRoot.XML as char CCSID InputRoot.MQMD.CCSID ENCODING InputRoot.MQMD.Encoding);

Its working fine.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jul 10, 2007 3:19 pm    Post subject: Reply with quote

Grand High Poobah

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

The other way you could have fixed this:

Declare myns NAMESPACE 'http://www.liberty.co.za/';

SET OutputRoot.MRM.soap:Body.myns:RequestTaxYears.node=Environment.Variables.msgchar;
_________________
MQ & Broker admin
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 » General Discussion » XML Attribute in ESQL (wbimb6.0)
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.