Topic
5 replies Latest Post - ‏2012-12-05T21:51:32Z by saaz
saaz
saaz
4 Posts
ACCEPTED ANSWER

Pinned topic xsl: how to extract MQRFH2 headers

‏2012-11-30T03:03:50Z |
we have a requirement to retry failure messages at retry interval of 5 min and max retries of 3. All the failure messages are routed to Retry queue with MQRFH2 headers containing Retry count and retry interval. I have created a Scheduled Processing Policy Rule which will trigger every 1 min. This rule(executes xslt) picks the messages from Retry queue and reprocess . using below code i'm able to extract MQMD headers and message but not MQRFH2 headers.

<dp:url-open target="dpmq://TESTQMGR/?ReplyQueue=TEST;TimeOut=500" response="responsecode"/>

If I'm using MQ Front side handler i can able to extract MQRFH2 header but not able extract headers using schedule policy rule.

Thanks in advance
Updated on 2012-12-05T21:51:32Z at 2012-12-05T21:51:32Z by saaz
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: xsl: how to extract MQRFH2 headers

    ‏2012-11-30T14:30:40Z  in response to saaz
    Saaz,
    Lots of threads are avaialble in Dev works on this ...

    Below are the URLS from teh DP Dev work might help you...

    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14304862&#14304862
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14889438&#14889438

    Thanks!
    Salla
  • saaz
    saaz
    4 Posts
    ACCEPTED ANSWER

    Re: xsl: how to extract MQRFH2 headers

    ‏2012-11-30T16:16:46Z  in response to saaz
    Thanks for your prompt response.The links you provided shows how to create headers but I didn't have any issues in creating MQMD or RFH2 headers. In my case I need to extract RFH2 headers with in xslt.
    • Daviiid
      Daviiid
      282 Posts
      ACCEPTED ANSWER

      Re: xsl: how to extract MQRFH2 headers

      ‏2012-12-03T13:09:30Z  in response to saaz
      Hello

      Try this

      <xsl:variable name="entries" select="dp:request-header('MQRFH2')" /> 
      <!-- parse into a usable nodeset --> 
      <xsl:variable name="header" select="dp:parse($entries)" />
      
      Updated on 2014-03-25T02:45:11Z at 2014-03-25T02:45:11Z by iron-man
      • saaz
        saaz
        4 Posts
        ACCEPTED ANSWER

        Re: xsl: how to extract MQRFH2 headers

        ‏2012-12-03T21:10:09Z  in response to Daviiid
        Sorry this code doesn't work with scheduled policy rule. if I'm using MQ FSH then I can use this code.
        • saaz
          saaz
          4 Posts
          ACCEPTED ANSWER

          Re: xsl: how to extract MQRFH2 headers

          ‏2012-12-05T21:51:32Z  in response to saaz
          finally able to figure out the way to extract MQRFH2 headers.

          <dp:url-open target="dpmq://TESTQMGR/?ParseHeaders=true;ReplyQueue=TEST;TimeOut=500" response="responsecode"/>