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 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
PostPosted: Thu Oct 18, 2018 9:03 am Post subject: Passing MQRFH2 and JMS header when splitting message Reply with quote


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:

by deploying the following code:

<?xml version="1.0" encoding="UTF-8"?><mappingRoot xmlns="" domainID="" domainIDExtension="mb" mainMap="true" targetNamespace="default" version="" 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"/>
            <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/."/>
                <input path="$Details/."/>
                <output path="OrderRequestData/Details"/>
                <input path="$msgRequestHeader/."/>
                <output path="OrderRequestData/msgRequestHeader"/>
                <input path="$Properties/." var="Properties"/>
                <output path="Properties"/>
                <input path="$MQRFH2/." var="MQRFH2"/>
                <output path="MQRFH2"/>
                <input path="$JMSTransport/." var="JMSTransport"/>
                <output path="JMSTransport"/>

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 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 All rights reserved.