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 » Incorrect XML output ?

Post new topic  Reply to topic
 Incorrect XML output ? « View previous topic :: View next topic » 
Author Message
WBI_user
PostPosted: Sun Mar 13, 2005 12:49 pm    Post subject: Incorrect XML output ? Reply with quote

Partisan

Joined: 07 Aug 2001
Posts: 386

Using WBI MB V5 at CSD3

my esql in compute node
SET OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.(XML.attr)class ='R' ;
SET OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.CG_RESULTCODE.(XML.attr)IsChanged ='Y';
SET OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.CG_RESULTCODE = InputRoot.XML.TCRMService.ResponseControl.ResultCode;
SET OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.CG_SERVICETIME.(XML.attr)IsChanged='Y';
SET OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.CG_SERVICETIME=InputRoot.XML.TCRMService.ResponseControl.ServiceTime ;
SET OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.CG_ECM_ID.(XML.attr)IsChanged ='Y';
SET OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.CG_ECM_ID = '123456789';

my XML output looks like
<CG_PERSONADD_RESPONSE>
<MsgData>
<Transaction>
<CG_RESPONSECTRL class="R">
<CG_RESULTCODE>FATAL</CG_RESULTCODE>
<CG_SERVICETIME>171</CG_SERVICETIME>
<CG_ECM_ID IsChanged="Y">123456789</CG_ECM_ID>
</CG_RESPONSECTRL>
</Transaction>
</MsgData>
</CG_PERSONADD_RESPONSE>

I dont know why I don't see the IsChange = "Y" in <CG_RESULTCODE> and <CG_SERVICETIME>
I only see that in <CG_ECM_ID IsChanged="Y">


Trcae actualy shows that the Ischanged = Y is set.

2005-03-13 15:32:23.731536 2068 UserTrace BIP2537I: Node 'mytest.Compute': Executing statement 'SET OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.CG_RESULTCODE.(XML.attr)IsChanged = 'Y';' at (.mytest_Compute.DWL2PS_Xform, 82.1).
2005-03-13 15:32:23.731723 2068 UserTrace BIP2538I: Node 'mytest.Compute': Evaluating expression 'XML.attr' at (.mytest.DWL2PS_Xform, 82.93).
2005-03-13 15:32:23.731786 2068 UserTrace BIP2566I: Node 'mytest.Compute': Assigning value ''Y'' to field / variable 'OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.CG_RESULTCODE.(XML.attr)IsChanged'.


Any idea why ??
Back to top
View user's profile Send private message
TonyD
PostPosted: Sun Mar 13, 2005 2:11 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

Try reordering the statements, eg:

Code:

SET OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.CG_RESULTCODE = InputRoot.XML.TCRMService.ResponseControl.ResultCode;
OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL.CG_RESULTCODE.(XML.attr)IsChanged ='Y';


:and see what happens.
Back to top
View user's profile Send private message Send e-mail
shrek
PostPosted: Sun Mar 13, 2005 2:59 pm    Post subject: Reply with quote

Acolyte

Joined: 19 Feb 2005
Posts: 61
Location: Gudivada,India

I have couple of suggestions to make

1) is to use the reference variables as the reference variables not only increase the performance but also makes the code more readable

2) you may want to try something like this

Code:

DECLARE OM REFERENCE TO OutputRoot.XML.CG_PERSONADD_RESPONSE.MsgData.Transaction.CG_RESPONSECTRL;

SET OM.CG_RESULTCODE.(XML.Attribute)IsChanged VALUE = 'Y';


Thanks
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 » Incorrect XML output ?
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.