|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Lost Attributes in tree copy |
« View previous topic :: View next topic » |
Author |
Message
|
clon |
Posted: Wed May 24, 2006 7:42 am Post subject: Lost Attributes in tree copy |
|
|
Newbie
Joined: 14 Sep 2005 Posts: 9 Location: London
|
Hello
Can anyone can help me with the following problem.
I have already done a search of the forum checked the link below but still no joy.
http://www.mqseries.net/phpBB2/viewtopic.php?t=26105&highlight=environment+parser
I have a SOAP encoded message which has within it the following from the trace:
(0x01000000)MiscTextFields = (
(0x01000000)MiscText = (
(0x03000000):index = '13'
(0x02000000): = '19940826145938'
)
(0x01000000)MiscText = (
(0x03000000):index = '14'
(0x02000000): = '1'
)
(0x01000000)MiscText = (
(0x03000000):index = '15'
(0x02000000): = '1060571'
)
(0x01000000)MiscText = (
(0x03000000):index = '5'
(0x02000000): = '5592220'
)
In the following compute node I have:
Create FIRSTCHILD of Environment DOMAIN 'XMLNS' Name 'Variables';
DECLARE InputMsg REFERENCE TO Environment.Variables.InputMsg;
Set InputMsg.XMLNS = InputRoot.XMLNS;
the result is loss of attributes in the InputMsg which I want to pass to a SOAP decode routine to create a message in the MRM to then do some mapping.
(0x01000000)MiscTextFields = (
(0x03000000)MiscText = '19940826145938'
(0x03000000)MiscText = '1'
(0x03000000)MiscText = '1060571'
(0x03000000)MiscText = '5592220'
What am I missing?
Thanks for any advice.
C |
|
Back to top |
|
 |
mgk |
Posted: Wed May 24, 2006 8:03 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Well, let's deconstruct your ESQL.
The first line creates a child of Envrionment called Variables, that belongs to an XMLNS parser. At this point all is good!
Code: |
Create FIRSTCHILD of Environment DOMAIN 'XMLNS' Name 'Variables'; |
Now this line tries to create a reference to a field called InputMsg, which does not exist, as it has not been created yet. Therefore, after this statement InputMsg actually points to Environment itself. Oh dear, not what we wanted at all. This could have been caught by checking LASTMOVE on the reference after declaration.
Code: |
DECLARE InputMsg REFERENCE TO Environment.Variables.InputMsg; |
And finally this line now creates a copy of the incoming msg into an Immediate child of Evironment (called XMLNS), which does not belong to any parser, and so loses the attributes.
Code: |
Set InputMsg.XMLNS = InputRoot.XMLNS; |
In the code shown above, the reference is unnecessary, and can be removed, leaving the following code, which should do what was originally intended (untested).
Code: |
Create FIRSTCHILD of Environment DOMAIN 'XMLNS' Name 'Variables';
Set Environment.Variables.InputMsg = InputRoot.XMLNS;
|
I hope this helps.
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
clon |
Posted: Wed May 24, 2006 10:15 am Post subject: |
|
|
Newbie
Joined: 14 Sep 2005 Posts: 9 Location: London
|
Thank you, I'm further down the chain, I'm now losing them when I change the domain to MRM but first I will check my code isn't bug ridden!  |
|
Back to top |
|
 |
clon |
Posted: Wed May 24, 2006 10:46 am Post subject: |
|
|
Newbie
Joined: 14 Sep 2005 Posts: 9 Location: London
|
I was a bit premature in my post.
Some attributes are carried forward and some aren't.
Tags such as this:
<SpecialField index="3"><code>C</code></SpecialField>
are ok in the trace:
(0x01000000)SpecialField = (
(0x01000000):index = (
(0x02000000): = '3'
)
(0x01000000)code = (
(0x02000000): = 'C'
)
But this below is not
<MiscText index="13">19940826145938</MiscText>
shown in the trace as:
(0x01000000)MiscTextFields = (
(0x01000000)MiscText = (
(0x02000000): = '19940826145938'
Can anyone tell me why that would be?
thanks
C |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|