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 to TDS mapping uing esql - Output message has no values

Post new topic  Reply to topic
 XML to TDS mapping uing esql - Output message has no values « View previous topic :: View next topic » 
Author Message
EAIMBGuy
PostPosted: Thu Sep 20, 2007 1:21 am    Post subject: XML to TDS mapping uing esql - Output message has no values Reply with quote

Newbie

Joined: 20 Sep 2007
Posts: 5

Hi All,

Need some MB help. Below is the scenario I am working on.

I have to do a translation from xml to csv type out put. So in MB, I have defined a input message set of xml type and output message set of TDS type. I am using esql in compute node to do this mapping/translation. In compute node I am doing the following -

OutputRoot.Propererties.MessageDomain = 'MRM';
OutputRoot.Propererties.MessageIdentifier = 'Message Id';
OutputRoot.Propererties.MessageForamt = 'TDS';
OutputRoot.Propererties.MesageType = 'OutPutMessage';

And after this I am reading the xml conent and assigning them to the Output Message as follows. (Infact my mapping involves more than 70 fields on either sides and I have to use esql only for mapping) -
OutputRoot.MRM.OutPutMessage.Field1 = InputRoot.XML.Root.Field1;
OutputRoot.MRM.OutPutMessage.Field2 = InputRoot.XML.Root.Field2;
OutputRoot.MRM.OutPutMessage.Field3 = InputRoot.XML.Root.Field3;
OutputRoot.MRM.OutPutMessage.Field4 = InputRoot.XML.Root.Field4;

Infact when I do debug using debugger, I can see These assignments being hapening properly. This can be seen when I come out of the Compute node and being there below MRM -> OutPutMessage section of the debugger.

But, when this output message is put to Queue .. I see -
1. The complete structure of the Output message
2. But the values in each field is not the ones that were assigned in the compute node. But ones those are set as default values those are defined in the output message set.

I am not getting any errors or exceptions.

So I am not sure what could be missing in my Compute node esql code. Need your help on the same at the earliest.

Appreciate ur help.

Thanks and Regards
EAIMBGuy


Last edited by EAIMBGuy on Thu Sep 20, 2007 1:44 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 20, 2007 1:29 am    Post subject: Re: XML to TDS mapping uing esql - Output message has no val Reply with quote

Grand High Poobah

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

EAIMBGuy wrote:
Outputroot.MRM.OutPutMessage.Field1 = Inputroot.Root.Field1;
Outputroot.MRM.OutPutMessage.Field2 = Inputroot.Root.Field2;
Outputroot.MRM.OutPutMessage.Field3 = Inputroot.Root.Field3;
Outputroot.MRM.OutPutMessage.Field4 = Inputroot.Root.Field4;


I'm surprised this works as you say it does in the debug. At least it should be InputRoot, and I would have expected InputRoot.XML (or if you're on v6 XMLNS). Or InputBody if it's modeled.

Post the output of the debug.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Sep 20, 2007 2:31 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I strongly suspect that your output message tree does not match your message definition. ( it may be very close, but it needs to match exactly ).

If you are on v6, there is a simple way to find the problem. Take a user trace - you will get a warning for each field which is 'self-defining' ( does not match the message definition ).

If you are on v5, set 'validation' to 'Content and value' on your output node.
You will get a validation error if the message tree does not match the definition.
Back to top
View user's profile Send private message
EAIMBGuy
PostPosted: Thu Sep 20, 2007 12:11 pm    Post subject: Reply with quote

Newbie

Joined: 20 Sep 2007
Posts: 5

Hi Kimbert,

I do not have any errors in Tracel Log. Below is the snippet of my trace log-

2007-09-20 09:47:42.191001 16368 UserTrace BIP2539I: Node 'TDSMessageFLow.MessageToOutput': Evaluating expression ''rowRecordSet.*:*[1].stockcode'' at ('.TDSMessageFLow_MessageToOutput.CopyEntireMessage', '44.53'). This resolved to ''rowRecordSet.*:*[1].stockcode''. The result was ''ROW... Root Element Type=50331648 NameSpace='' Name='stockcode' Value='0T1380037'''.
2007-09-20 09:47:42.191001 16368 UserTrace BIP2568I: Node 'TDSMessageFLow.MessageToOutput': Copying sub-tree from ''rowRecordSet.*:*[1].stockcode'' to ''OutputRoot.MRM.RepairOrder_Output.Customer''.
2007-09-20 09:47:42.191001 16368 UserTrace BIP2537I: Node 'TDSMessageFLow.MessageToOutput': Executing statement ''SET OutputRoot.MRM.RepairOrder_Output.Address = rowRecordSet.*:*[1].kva;'' at ('.TDSMessageFLow_MessageToOutput.CopyEntireMessage', '45.4').
2007-09-20 09:47:42.191001 16368 UserTrace BIP2539I: Node 'TDSMessageFLow.MessageToOutput': Evaluating expression ''rowRecordSet.*:*[1].kva'' at ('.TDSMessageFLow_MessageToOutput.CopyEntireMessage', '45.52'). This resolved to ''rowRecordSet.*:*[1].kva''. The result was ''ROW... Root Element Type=50331648 NameSpace='' Name='kva' Value=37''.
2007-09-20 09:47:42.191001 16368 UserTrace BIP2568I: Node 'TDSMessageFLow.MessageToOutput': Copying sub-tree from ''rowRecordSet.*:*[1].kva'' to ''OutputRoot.MRM.RepairOrder_Output.Address''.
2007-09-20 09:47:42.191001 16368 UserTrace BIP2537I: Node 'TDSMessageFLow.MessageToOutput': Executing statement ''SET OutputRoot.MRM.RepairOrder_Output.AccountNumber = rowRecordSet.*:*[1].connection_code;'' at ('.TDSMessageFLow_MessageToOutput.CopyEntireMessage', '46.4').
2007-09-20 09:47:42.191001 16368 UserTrace BIP2539I: Node 'TDSMessageFLow.MessageToOutput': Evaluating expression ''rowRecordSet.*:*[1].connection_code'' at ('.TDSMessageFLow_MessageToOutput.CopyEntireMessage', '46.58'). This resolved to ''rowRecordSet.*:*[1].connection_code''. The result was ''ROW... Root Element Type=50331648 NameSpace='' Name='connection_code' Value='ABC'''.
2007-09-20 09:47:42.191001 16368 UserTrace BIP2568I: Node 'TDSMessageFLow.MessageToOutput': Copying sub-tree from ''rowRecordSet.*:*[1].connection_code'' to ''OutputRoot.MRM.RepairOrder_Output.AccountNumber''.
2007-09-20 09:47:42.191001 16368 UserTrace BIP2537I: Node 'TDSMessageFLow.MessageToOutput': Executing statement ''RETURN TRUE;'' at ('.TDSMessageFLow_MessageToOutput.Main', '5.3').
2007-09-20 09:47:42.191001 16368 UserTrace BIP4007I: Message propagated to 'out' terminal of node 'TDSMessageFLow.MessageToOutput'.
2007-09-20 09:47:42.769001 16368 UserTrace BIP2638I: The MQ output node 'TDSMessageFLow.OQueue' attempted to write a message to queue ''R.OUTQ'' connected to queue manager ''QM1''. The MQCC was '0' and the MQRC was '0'.
2007-09-20 09:47:42.769001 16368 UserTrace BIP2622I: Message successfully output by output node 'TDSMessageFLow.OQueue' to queue ''R.OUTQ'' on queue manager ''QM1''.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Sep 20, 2007 12:21 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You are on v6, right? ( just checking, as you didn't actually say so )

Default values are applied when
- the Data Element Separation of the parent structure is 'Fixed Length'
- the field is not in the message tree ( or is not in the correct place, which amounts to the same thing from the parser's point of view )

So - check that the members of each structure are in the correct order (i.e. in the order defined in the message definition ).
Back to top
View user's profile Send private message
EAIMBGuy
PostPosted: Thu Sep 20, 2007 1:53 pm    Post subject: Reply with quote

Newbie

Joined: 20 Sep 2007
Posts: 5

Hi,


Yes I am on V6.

Thanks and Regards
EAIMBGuy
Back to top
View user's profile Send private message
EAIMBGuy
PostPosted: Thu Sep 20, 2007 2:39 pm    Post subject: Reply with quote

Newbie

Joined: 20 Sep 2007
Posts: 5

Hi kimbert,

When u say check for the order, do u mean to say I must map in the order the fields are created in message set? Also, can I ignore mapping/assigning if the output field is not supposed to be mapped.

Thanks and Regards
EAIMBGuy
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Sep 20, 2007 4:15 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
When u say check for the order, do u mean to say I must map in the order the fields are created in message set?
Yes, I'm afraid so. If you change the 'Composition' property of all your complex types/groups from 'Sequence' to 'UnorderedSet' then WMB will automatically re-order the fields as it writes them...but this will increase CPU usage and may reduce your message throughput quite a lot.

Quote:
Also, can I ignore mapping/assigning if the output field is not supposed to be mapped.
Your output message tree should contain every field defined in the message set, in the order defined in the message set. If a field is not in the message tree it will be assigned a default value from the message set. If no default value has been defined, a parsing exception will be thrown.
Back to top
View user's profile Send private message
EAIMBGuy
PostPosted: Thu Sep 20, 2007 5:07 pm    Post subject: Reply with quote

Newbie

Joined: 20 Sep 2007
Posts: 5

Hi All,

Thanks for ur help. It is working now.

I am supposed to assign as below. Here was the misake -

Outputroot.MRM.OutPutMessage.Field1 = Inputroot.Root.Field1;
Outputroot.MRM.OutPutMessage.Field2 = Inputroot.Root.Field2;
Outputroot.MRM.OutPutMessage.Field3 = Inputroot.Root.Field3;
Outputroot.MRM.OutPutMessage.Field4 = Inputroot.Root.Field4;

Thanks and Regards
EAIMB Guy
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 to TDS mapping uing esql - Output message has no values
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.