Author |
Message
|
Galichet |
Posted: Wed Aug 08, 2001 1:52 am Post subject: |
|
|
Acolyte
Joined: 26 Jun 2001 Posts: 69 Location: Paris - France
|
Hi all,
I have in input the following message
: "< MYMSG >< CH1 >HELLO< /CH1 >< /MYMSG >"
I want the following message in my outputQueue (I want to include the input XML message into a new XML message)
: "< MSG >< GEFAPP >< MYMSG >< CH1 >HELLO< /CH1 >< /MYMSG >< /GEFAPP >< /MSG >"
My compute node contains the following command :
Set OutputRoot.XML.MSG.GEFAPP = InputBody;
The result in my output Queue is
: "< MSG >< MYMSG >< CH1 >HELLO< /CH1 >< /MYMSG >< /MSG >"
I don't understand why my tag GEFAPP has disapeared ??
What is very strange is that in the trace generated just before the output node, this tag is well displayed ...
_________________
Eric Galichet
IBM Global Services
France
[ This Message was edited by: Galichet on 2001-08-08 02:54 ]
[ This Message was edited by: Galichet on 2001-08-08 02:55 ]
[ This Message was edited by: Galichet on 2001-08-08 02:56 ]
[ This Message was edited by: Galichet on 2001-08-08 02:56 ] |
|
Back to top |
|
 |
bh |
Posted: Wed Aug 08, 2001 3:49 am Post subject: |
|
|
Acolyte
Joined: 25 Jun 2001 Posts: 61
|
Hello,
I don'y think it's a bug but the right way MQSI is working is the following. To achieve your goal, you 'll have to write this sentence:
Set OutputRoot."XML"."MSG"."GEFAPP"."MYMSG" = InputRoot.XML.MYMSG;
Or this one
Set OutputRoot."XML"."MSG"."GEFAPP"."MYMSG" = InputRoot.XML.*;
Using the way you try you would need two compute nodes, the first one doing :
Set OutputRoot."XML"."GEFAPP"."A" = InputBody;
And the second one
Set OutputRoot."XML"."MSG"."B" = InputBody;
Don't ask me why, but it's the way it works. |
|
Back to top |
|
 |
kolban |
Posted: Wed Aug 08, 2001 5:02 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
Good question and answer. It smells like a bug to me. I have a gut feel that ESQL in compute nodes does indeed know that it is working with XML (as opposed to blindly manipulating trees). I think that this may be causing the grief here. It could be InputBody - which is short-and for Root.*[LAST] and hence equates (in your case to) Root.XML may be being treated specially. What you coded "should" have worked. |
|
Back to top |
|
 |
Armin |
Posted: Thu Aug 09, 2001 9:55 am Post subject: |
|
|
Novice
Joined: 24 Jul 2001 Posts: 15 Location: Germany
|
I had a similar problem and this worked for me:
SET OutputRoot.XML.(XML.tag)MSG =InputBody;
Armin |
|
Back to top |
|
 |
Galichet |
Posted: Mon Aug 20, 2001 12:07 am Post subject: |
|
|
Acolyte
Joined: 26 Jun 2001 Posts: 69 Location: Paris - France
|
You're right Armin, it works well with this syntax.
Thank you very much
_________________ Eric Galichet
SMABTP
France |
|
Back to top |
|
 |
|