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 » Result from MQGET is getting missplaced in o/p of MQGET Node

Post new topic  Reply to topic
 Result from MQGET is getting missplaced in o/p of MQGET Node « View previous topic :: View next topic » 
Author Message
PankajS
PostPosted: Tue Mar 21, 2006 2:21 am    Post subject: Result from MQGET is getting missplaced in o/p of MQGET Node Reply with quote

Voyager

Joined: 27 Dec 2004
Posts: 82

Hi friends,
I am using MQGET node to get application specific header from a Q and want to replace Application specific headers from responce message with these headers.
I am using message set.

Using MQGET node Properties>>Result>> as follows.
o/p Data LOcation : OutputRoot.MRM.soapenv:Envelope.soapenv:Header
Result Data Location : ResultRoot.MRM.Header

Message Domain : MRM (With proper message sets)

but instaead of replacing the header from original input message this header from result is getting appended at the end of body

Some more details about i/p and o/p message to MQGET Node.

I/p message to MQGET Node (Just part of it )
<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:ns="http://www.hsbc.com/ism1_1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header> (I want to replace header from result here)



but I get o/p as follows (Just part of it)

</soapenv:Body> (But header is getting appended at the end of body)
<NS1:Envelope xmlns:NS1="soapenv">
<NS1:Header>
<OpHdr>


Q: How should i write the result tab to get expected result ?

Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Mar 21, 2006 2:31 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi PankajS,

It is working as it is supposed to I guess.

If you want to replace the headers with the header u want, then u have to remove the header that you dont want by making it NULL.

If you are using some compute node before the MQGet then do it there...

Regards.
Back to top
View user's profile Send private message Send e-mail
PankajS
PostPosted: Tue Mar 21, 2006 3:05 am    Post subject: Reply with quote

Voyager

Joined: 27 Dec 2004
Posts: 82

Hi elvis_gn,

I tried using Compute node before MQGET node.I SET the headers to null

Even i now ,am getting the result headers appended at the end of body only.
In this case i am not getting any Headers before body.(as we have set it to null )...

any suggestion.
Back to top
View user's profile Send private message
wschutz
PostPosted: Tue Mar 21, 2006 3:11 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

What did you set "Generate Mode" and "Copy Message" to in the MQGET properties? They control what is copied from the input terminal to the output terminal.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
PankajS
PostPosted: Tue Mar 21, 2006 3:20 am    Post subject: Reply with quote

Voyager

Joined: 27 Dec 2004
Posts: 82

Hi wschutz,

Following are the settings in Properties>Advanced Tab

Transection : NO
Generate MOde :MEssage and Localenvironment
Copy Message : Copy entire message
Copy Local Environment :Copy Entire Local Environment
Back to top
View user's profile Send private message
PankajS
PostPosted: Tue Mar 21, 2006 3:34 am    Post subject: Reply with quote

Voyager

Joined: 27 Dec 2004
Posts: 82

Hi ,
I think i am not putting the namespace information right.

Is there any special syntax to refer namespace qualified elements in Properties>Result tab of MQGET node ??

Even i am not sure that MQGET understands the namespace qualification to the elements.Can it do that for sure ??

Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Mar 21, 2006 4:11 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi PankajS,

Before we start meddling with that, can you please tell us what the structure of the message is at the breakpoints between nodes...

Please tell us what Headers are being passed into the MQGet and what is being Outputted....

Regards.
Back to top
View user's profile Send private message Send e-mail
PankajS
PostPosted: Tue Mar 21, 2006 4:52 am    Post subject: Reply with quote

Voyager

Joined: 27 Dec 2004
Posts: 82

Hi elvis_gn ,
Here are the details.

My Input Message to MQ Get Node is :
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://www.hsbc.com/ism1_1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Header> (This is original header which i want to
replace with header stored in a Q )

<OpHdr><OpHdrVersNum>1.1</OpHdrVersNum><OpDefinCnt>5</OpDefinCnt>
<IgnrErrFlag>N</IgnrErrFlag>
<OpDefin><SvceId>eCafe_ker</SvceId><OpId>WGGAI021</OpId><SvceVersNum>1.1</SvceVersNum>
<RoutingType></RoutingType><RoutingData>0000005254901150016294 1</RoutingData>
</OpDefin><OpDefin><SvceId>eCafe_ker</SvceId><OpId>WGGAI022</OpId>
<SvceVersNum>1.1</SvceVersNum><RoutingType></RoutingType>
<RoutingData>0000005254901150016294 1</RoutingData></OpDefin>
<OpDefin><SvceId>eCafe_ker</SvceId><OpId>WGGAI023</OpId><SvceVersNum>1.1</SvceVersNum>
<RoutingType></RoutingType><RoutingData>0000005254901150016294 1</RoutingData>
</OpDefin><OpDefin><SvceId>eCafe_ker</SvceId><OpId>WGGAI024</OpId>
<SvceVersNum>1.1</SvceVersNum><RoutingType></RoutingType>
<RoutingData>0000005254901150016294 1</RoutingData></OpDefin>
<OpDefin><SvceId>eCafe_ker</SvceId><OpId>WGGAI025</OpId><SvceVersNum>1.1</SvceVersNum>
<RoutingType></RoutingType><RoutingData>0000005254901150016294 1</RoutingData></OpDefin>
</OpHdr>
<ISMHdr><ISMHdrVersNum>1.1</ISMHdrVersNum><AppName>collections</AppName>
<UserId>VENA08</UserId><ClntId>12345</ClntId><ClntHostId>IPAddr</ClntHostId>
<GloblLogId>1099999582012023</GloblLogId><MsgInstcId>9999584229</MsgInstcId>
<UserDviceId>133.4.2.152</UserDviceId><InbndChanlId>2001</InbndChanlId>
<SessnId>9999582951</SessnId><MsgCreatTmsp>2006-01-04T09:15:43.167000+05:30</MsgCreatTmsp>
</ISMHdr>

</soapenv:Header>

<soapenv:Body> (I want this body part as it is
in o/p)

<ns:RqstBundleImsg>
<RqstElemt>GMABA 20060302 </RqstElemt>
<RqstElemt>GMABA FCEMI </RqstElemt>
<RqstElemt>GMABA 0001 </RqstElemt>
<RqstElemt>GMABA 0001 </RqstElemt>
<RqstElemt>GMABA 0001 </RqstElemt>
</ns:RqstBundleImsg>
</soapenv:Body>
(As i posted in earlier mail,header from Q gets appended here instead of replacing the header )
</soapenv:Envelope>
_______________________

Below is the message which i get after MQ get operation from a Q(Stored Header)
<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.hsbc.com/ism1_1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<Header> (I want to put this header in input message Header)
<OpHdr>
<OpHdrVersNum>1.1</OpHdrVersNum>
<OpDefinCnt>5</OpDefinCnt>
<IgnrErrFlag>N</IgnrErrFlag>
<OpDefin>
<SvceId>eCafe_ker</SvceId>
<OpId>WGGAI021</OpId>
<SvceVersNum>1.1</SvceVersNum>
<RoutingType></RoutingType>
<RoutingData>0000005254901150016294 1</RoutingData>
</OpDefin>
<OpDefin>
<SvceId>eCafe_ker</SvceId>
<OpId>WGGAI022</OpId>
<SvceVersNum>1.1</SvceVersNum>
<RoutingType></RoutingType>
<RoutingData>0000005254901150016294 1</RoutingData>
</OpDefin>
<OpDefin>
<SvceId>eCafe_ker</SvceId>
<OpId>WGGAI023</OpId>
<SvceVersNum>1.1</SvceVersNum>
<RoutingType></RoutingType>
<RoutingData>0000005254901150016294 1</RoutingData>
</OpDefin>
<OpDefin>
<SvceId>eCafe_ker</SvceId>
<OpId>WGGAI024</OpId>
<SvceVersNum>1.1</SvceVersNum>
<RoutingType></RoutingType>
<RoutingData>0000005254901150016294 1</RoutingData>
</OpDefin>
<OpDefin>
<SvceId>eCafe_ker</SvceId>
<OpId>WGGAI025</OpId>
<SvceVersNum>1.1</SvceVersNum>
<RoutingType></RoutingType>
<RoutingData>0000005254901150016294 1</RoutingData>
</OpDefin>
</OpHdr>
<ISMHdr>
<ISMHdrVersNum>1.1</ISMHdrVersNum>
<AppName>collections</AppName>
<UserId>VENA08</UserId>
<ClntId>12345</ClntId>
<ClntHostId>IPAddr</ClntHostId>
<GloblLogId>1099999582012023</GloblLogId>
<MsgInstcId>9999584229</MsgInstcId>
<UserDviceId>133.4.2.152</UserDviceId>
<InbndChanlId>2001</InbndChanlId>
<SessnId>9999582951</SessnId>
<MsgCreatTmsp>2006-01-04T09:15:43.167000+05:30</MsgCreatTmsp>
</ISMHdr>
</Header>

</soapenv:Envelope>
__________________________________________
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Mar 21, 2006 5:22 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi PankajS,

The infocenter says

Quote:
Constructing the Output message
1. If generateMode does not include message, then set the output message to be the input one. Goto step 5.
2. If output Data Location is set to OutputRoot, then create the output message entirely from the result tree. Goto step 5.
3. If copyMessage is not set to none, then copy the input message into the output message tree.
4. If the output data location points to a part of the output message tree, then changes are inserted here by copying from the result tree at the point defined by result Data Location.
5. The message is propagated.


This means that your
Quote:
Using MQGET node Properties>>Result>> as follows.
o/p Data LOcation : OutputRoot.MRM.soapenv:Envelope.soapenv:Header
Result Data Location : ResultRoot.MRM.Header

is working as it is supposed to....

I don't think there is a replace, there is only inserting....

You will have to delete the OutputRoot.MRM.soapenv:Envelope.soapenv:Header once you have passed the MQGet...

Note: The infocenter has a brilliant explanation on how the MQGet node works...it shows flowchart representation too.

Regards.
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Tue Mar 21, 2006 5:38 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

PankajS wrote:
Hi elvis_gn,

I tried using Compute node before MQGET node.I SET the headers to null

Even i now ,am getting the result headers appended at the end of body only.
In this case i am not getting any Headers before body.(as we have set it to null )...

any suggestion.


Ya i forgot to explain this....consider your settings
Quote:
Using MQGET node Properties>>Result>> as follows.
o/p Data LOcation : OutputRoot.MRM.soapenv:Envelope.soapenv:Header
Result Data Location : ResultRoot.MRM.Header

The structure at Result Data location is picked and inserted after the structure at o/p Data LOcation...Since you did not have a soapenv:Header(we made it NULL) , MB could not figure out where you wanted the MRM.Header to be inserted...and so it wasen't....

Again...do the NULLing of soapenv:Header after the MQGet

Regards.
Back to top
View user's profile Send private message Send e-mail
mgk
PostPosted: Tue Mar 21, 2006 6:54 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

The OutputDataLocation will replace existing data, if data exists at the location specified.

However, when you are using namespaces in the OutputDataLocation, you cannot declare a namespace alias as you can in a Compute Node.
Therefore to use a namespace on an element you have to use the fully qualifed namaspace name. To see the actual namespace name on an element you can use a trace node before the MQGet Node to see for sure. However in the case, the following should work (but I have not tested it)

OutputRoot.MRM."http://schemas.xmlsoap.org/soap/envelope/":Envelope."http://schemas.xmlsoap.org/soap/envelope/":Header


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
View user's profile Send private message
PankajS
PostPosted: Tue Mar 21, 2006 10:30 pm    Post subject: Reply with quote

Voyager

Joined: 27 Dec 2004
Posts: 82

Thanks mgk/elvis_gn,
At last things are working fine.Thanks mgk,ur sugeestions worked.
I just had to remove "Namesace":Envelope to avoid duplication.

I will like to summerise the contents of thread.

1)ResultRoot can replace any reference location in the OutputRoot.
2)Namespace do not take alies as in compute node.Fully qualified name space should be added to reference the element.Namespace should be put in double quats "" not single ''.


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 » Result from MQGET is getting missplaced in o/p of MQGET Node
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.