使用 xsl 从队列中读取消息

To read a message from Queueu using xsl

我有如下场景。

Request : MQFSH - > MPGW (We will soter MQ header of request in Q1) --> http backend
Response : http response --> MPGW ( read the MQMD header message stored in Q1 and append to reponse message) -- > MQ 

请告诉我如何在 xsl 中读取来自 Q1 的消息?

谢谢 & Reagrds, 斯里瓦萨A 9986186302

我能够使用 xsl 在转换操作中写入和读取消息。

写作:

<dp:url-open target="dpmq://qmgr/?RequestQueue=queue_name" response="responsecode-ignore">

正在阅读:

<dp:url-open target="dpmq://qmgr/?ParseHeaders=true;ReplyQueue=queue_name" response="xml"/>

谢谢, 斯里瓦萨 A

在变量中动态调用 MQ。发送请求后,响应将存储在变量中。

要查看响应数据,您可以显示变量或存储在上下文变量中。

请看下面的例子。

<xsl:variable name="resultMQ">    
<dp:url-open target="url" response="responsecode-ignore" content-type="text/xml" http-method="post">
        <soapenv:Envelope>
            <soapenv:Header/>
            <soapenv:Body>
                <Request>
                    <Message>Request you are sending to MQ</Message>
                </Request>
            </soapenv:Body>
        </soapenv:Envelope>
    </dp:url-open>

</xsl:variable>
<!-- Storing the MQ result in Context Variable-->
<dp:set-variable name="'var://context/service/MQResult'" value="$resultMQ"/>