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 IndexWebSphere Message Broker SupportPassing MQRFH2 and JMS header when splitting message

Post new topicReply to topic
Passing MQRFH2 and JMS header when splitting message View previous topic :: View next topic
Author Message
jcv
PostPosted: Thu Oct 18, 2018 9:03 am Post subject: Passing MQRFH2 and JMS header when splitting message Reply with quote

Chevalier

Joined: 07 May 2007
Posts: 409
Location: Zagreb

When splitting an input message into multiple output messages, by using For Each transform in a Mapping node, I want to pass MQRFH2 and JMS header of input message to each output message, as described here:

https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/br28711_.htm

by deploying the following code:

Code:
<?xml version="1.0" encoding="UTF-8"?><mappingRoot xmlns="http://www.ibm.com/2008/ccl/Mapping" domainID="com.ibm.msl.mapping.xml" domainIDExtension="mb" mainMap="true" targetNamespace="default" version="8.0.5.0" xmlns:map="default">
    <input path="/messageSet/MQreq.mxsd"/>
    <output path="/messageSet/MQreq.mxsd"/>
    <generation engine="xquery"/>
    <mappingDeclaration name="MsgFlow_Mapping">
        <input path="mb:msg(OrderRequestData,assembly,XMLNSC,Properties,MQMD,MQRFH2,JMSTransport)" var="ComIbmMessageAssembly_OrderRequestData"/>
        <output path="mb:msg(OrderRequestData,assembly,XMLNSC,Properties,MQMD,MQRFH2,JMSTransport)" var="ComIbmMessageAssembly_OrderRequestData1"/>
        <foreach>
            <input path="$ComIbmMessageAssembly_OrderRequestData/OrderRequestData/Details" var="Details"/>
            <input auxiliary="true" path="$ComIbmMessageAssembly_OrderRequestData/Properties" var="Properties"/>
            <input auxiliary="true" path="$ComIbmMessageAssembly_OrderRequestData/OrderRequestData/msgRequestHeader" var="msgRequestHeader"/>
            <input auxiliary="true" path="$ComIbmMessageAssembly_OrderRequestData/MQRFH2" var="MQRFH2"/>
            <input auxiliary="true" path="$ComIbmMessageAssembly_OrderRequestData/JMSTransport" var="JMSTransport"/>
            <output path="$ComIbmMessageAssembly_OrderRequestData1/."/>
            <move>
                <input path="$Details/."/>
                <output path="OrderRequestData/Details"/>
            </move>
            <move>
                <input path="$msgRequestHeader/."/>
                <output path="OrderRequestData/msgRequestHeader"/>
            </move>
            <move>
                <input path="$Properties/." var="Properties"/>
                <output path="Properties"/>
            </move>
            <move>
                <input path="$MQRFH2/." var="MQRFH2"/>
                <output path="MQRFH2"/>
            </move>
            <move>
                <input path="$JMSTransport/." var="JMSTransport"/>
                <output path="JMSTransport"/>
            </move>
        </foreach>
    </mappingDeclaration>
</mappingRoot>


but it doesn't work. If I omit mapping of these two headers, only the first output message inherits it from the input message, and others don't, with such mapping however, both headers are lost even in the first message.
I did the mapping graphically as explained, just posted the result here as text. So, I added both headers with "Add or remove headers or folders" and connected it with supplement connection to For each transform, and in the nested map just applied Move transform to the output assembly.

The same thing however works for msgRequestHeader, that is inside OrderRequestData (I don't know does it matter), occuring just once before Details start repeating in the original message, and after applying this mapping each splitted message has one msgRequestHeader and one Detail, as intended by this mapping. As for the Properties, I didn't even check are they passed or not.

Can someone please propose the improvement, ie solution?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportPassing MQRFH2 and JMS header when splitting message
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.