Topic
12 replies Latest Post - ‏2012-11-09T17:45:28Z by Bankrupt
Bankrupt
Bankrupt
38 Posts
ACCEPTED ANSWER

Pinned topic MQ Message Properties (MQMP) -- Read and Write

‏2012-10-31T16:40:35Z |
Hi -- I am working on DP XI150 and trying to Write and Read MQ Message Properties (MQMP) and need help with that. I am new to MQ and I dont have deep knowledge of MQ either. So sorry about my dumb questions....
Based on some IBM Documents, I have added the MQMP header to the message using the following XSL (Transformation Action) before 'PUTTING' the message to the MQ.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dp="http://www.datapower.com/extensions" xmlns:dpconfig="http://www.datapower.com/param/config" xmlns:wsl="urn:ford/dp/wslCookies" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" extension-element-prefixes="dp" exclude-result-prefixes="dp dpconfig">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:variable name="newMQMP">
<MQMP>
<Property name="car.color" type="string">red</Property>
<Property name="car.year" type="int32">1997</Property>
<Property name="car.domestic" type="boolean">TRUE</Property>
<Property name="car.code" type="hexstr">4142434445</Property>
</MQMP>
</xsl:variable>
<xsl:variable name="result-mqmp">
<dp:serialize select="$newMQMP" omit-xml-decl="yes"/>
</xsl:variable>
<!-- set the new MQMP headers -->
<dp:set-request-header name="’MQMP’" value="$result-mqmp"/>
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>

However I am not able to read the MQMP on 'GETTING' the same message from MQ. I did a probe and I just see the standard MQMD header but I dont see any MQMP header that I added. Do I need to do anything on the MQ Side too ? Can you help me with this ?

Thanks
Ref: Page 63 on http://publib.boulder.ibm.com/infocenter/wsdatap/v3r8m1/topic/xm70/integratingWithMQ.pdf
Updated on 2012-11-09T17:45:28Z at 2012-11-09T17:45:28Z by Bankrupt
  • swlinn
    swlinn
    1344 Posts
    ACCEPTED ANSWER

    Re: MQ Message Properties (MQMP) -- Read and Write

    ‏2012-10-31T18:40:37Z  in response to Bankrupt
    Assuming MQ is at V7, that is where message properties were supported. If MQ is at a prior version, then it will not recognize your message properties. In your receiving DataPower service, did you configure your MQ front side handler to enable the "parse properties" configuration value?

    Regards,
    Steve
    • Bankrupt
      Bankrupt
      38 Posts
      ACCEPTED ANSWER

      Re: MQ Message Properties (MQMP) -- Read and Write

      ‏2012-10-31T19:11:55Z  in response to swlinn
      Yes...the MQ is at 7.0 and I have enabled the "parse properties" configuration value too.
      • Bankrupt
        Bankrupt
        38 Posts
        ACCEPTED ANSWER

        Re: MQ Message Properties (MQMP) -- Read and Write

        ‏2012-11-01T19:52:57Z  in response to Bankrupt
        I tried many things and I still dont get it to work. My assumption is that we can Add/Modify the MQMP (using a Transformation Action) before 'PUT'ing to MQ. Is that right ? Is there a way to verify the Headers with MQ to see if my MQMP exists ? Any quick help will greatly be appreciated. I want to add some user defined values in the MQMP header before a "PUT" and read the same on a "GET"
        • swlinn
          swlinn
          1344 Posts
          ACCEPTED ANSWER

          Re: MQ Message Properties (MQMP) -- Read and Write

          ‏2012-11-01T20:34:55Z  in response to Bankrupt
          What is your backside url when you put the request from your first DP service?

          Regards,
          Steve
          • Bankrupt
            Bankrupt
            38 Posts
            ACCEPTED ANSWER

            Re: MQ Message Properties (MQMP) -- Read and Write

            ‏2012-11-02T01:17:50Z  in response to swlinn
            My backside URL for PUT is dpmq://QM_RAS04029/?RequestQueue=DATAPWR.POC.QUEUE
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: MQ Message Properties (MQMP) -- Read and Write

    ‏2012-11-02T14:43:03Z  in response to Bankrupt
    MQ Message Properties are not visible due to the fact that "Properties Control" attribute of the queue is set as "Compatibility" mode to preseve backward compatibility with MQ V6.
    In order to see the MQMP headers, you need to change the PROPCTRL attribute of the queue to "ALL" or "FORCE MQRFH2" so that one can see the Named Properties using MQ Explorer.

    While setting the MQMP header, yo can enable probe and can see the MQMP headers in the DataPower side. However, qmgr side can be visible when PROPCTL attribute is set to "All" or "Force MQRFH2".
    This queue attribute can be set using MQ Explorer or using runmqsc command. One can see the MQMP headers using RFHUtil tool as well. Review the following links for further details.

    http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=%2Fcom.ibm.mq.csqzao.doc%2Fmi203602.htm

    http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?topic=/com.ibm.iea.wmq_v7/wmq/7.0/MQI/iea_320_wmqv7_API_2_GetSet/player.html
    • Bankrupt
      Bankrupt
      38 Posts
      ACCEPTED ANSWER

      Re: MQ Message Properties (MQMP) -- Read and Write

      ‏2012-11-02T15:00:25Z  in response to SystemAdmin
      I did as described and I still dont see it. Looks like the 'PUT' itself is failing but I have no clue. In the Probe, I see the MQMP in the Headers tab. I have attached the snip-it of Header captured from the probe. Let me know if I missed anything. I will attach snip-it of the service variable tab in the post below.
      • Bankrupt
        Bankrupt
        38 Posts
        ACCEPTED ANSWER

        Re: MQ Message Properties (MQMP) -- Read and Write

        ‏2012-11-02T15:01:09Z  in response to Bankrupt
        Continues form above...
        Attached service variable tab captured from the probe.
      • swlinn
        swlinn
        1344 Posts
        ACCEPTED ANSWER

        Re: MQ Message Properties (MQMP) -- Read and Write

        ‏2012-11-02T16:45:11Z  in response to Bankrupt
        So to be clear, you are not seeing a request at your 2nd DP service? If the put is failing, are you seeing a 2xxx error in the system logs?

        Regards,
        Steve
        • Bankrupt
          Bankrupt
          38 Posts
          ACCEPTED ANSWER

          Re: MQ Message Properties (MQMP) -- Read and Write

          ‏2012-11-02T17:22:03Z  in response to swlinn
          My PUT is working fine with no errors. The problem is I dont see the MQMP header when I do a GET. So I dont know if the PUT failed to put the MQMP or if the GET is failing to get the MQMP.
          • swlinn
            swlinn
            1344 Posts
            ACCEPTED ANSWER

            Re: MQ Message Properties (MQMP) -- Read and Write

            ‏2012-11-02T20:56:08Z  in response to Bankrupt
            Since you already said above that you are have the parse properties option on your MQ FSH enabled, then I'd suggest you open a PMR with DataPower support. Either the properties are not getting to your request queue because of the queue attributes mentioned above, or you are not parsing them in the FSH, but perhaps L2 can help understand if there is another scenario where they are being dropped.

            Regards,
            Steve
  • Bankrupt
    Bankrupt
    38 Posts
    ACCEPTED ANSWER

    Re: MQ Message Properties (MQMP) -- Read and Write

    ‏2012-11-09T17:45:28Z  in response to Bankrupt
    I fixed the issue and it was stupid on my part. I had wrong quotes around 'MQMP' in the line <dp:set-request-header name="’MQMP’" value="$result-mqmp"/> . It worked after I changed to <dp:set-request-header name="'MQMP'" value="$result-mqmp"/>.

    However the surprising part was DP did not complain about this syntax error. Also I copied and pasted this code from the IBM documents. So watch out. ;-).