Author |
Message
|
mvs |
Posted: Fri Jul 06, 2007 12:42 am Post subject: XML Attribute in ESQL (wbimb6.0) |
|
|
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 |
|
 |
Vitor |
Posted: Fri Jul 06, 2007 12:49 am Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Fri Jul 06, 2007 1:28 am Post subject: |
|
|
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 |
|
 |
mvs |
Posted: Fri Jul 06, 2007 5:06 am Post subject: XML Attribute in ESQL (wbimb6.0) |
|
|
Voyager
Joined: 06 Jul 2007 Posts: 85
|
Thanks for the help.Now its working. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jul 06, 2007 5:15 am Post subject: Re: XML Attribute in ESQL (wbimb6.0) |
|
|
 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 |
|
 |
mvs |
Posted: Tue Jul 10, 2007 3:24 am Post subject: XML Attribute in ESQL (wbimb6.0) |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Jul 10, 2007 3:19 pm Post subject: |
|
|
 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 |
|
 |
|