betaalfa.com

Icon

The blog of Niklas Thulin

IBM WebSphere MQ Bridge for HTTP (MA0Y) Tested

At the end of June IBM released the IBM WebSphere MQ Bridge for HTTP support pack. What it basically does is to bring an HTTP API, in a RESTful way, to WebSphere MQ.

MA0Y requires:

An WebSphere MQ resource adapter support statement can be found here.

The MA0Y support pack includes two downloads:

  • Install
    • includes the WMQHTTP web application archive
  • Samples
    • A pre-packaged IBM WebSphere Application Server Community Edition with WMQHTTP web application and WebSphere MQ J2EEConnectorArchitecture (JCA) resource adapter
    • A client samle application called P2PConsole.
    • Deployment plans for IBM Webphere Application Server Community Edition (applicable to Geronimo as well)

Get going with the samles download

  • Download and extract from the support pack site
  • Verify that you have a local queue manager set up named HTTP.QM
  • Navigate to the ma0y.samples\WASCE\bin directory and execute startup.bat
  • Navigate to the ma0y.samples\P2PConsole directory
  • Run this command java -cp . HTTPPOST SYSTEM.DEFAULT.LOCAL.QUEUE localhost:8080 mq to put a message onto the SYSTEM.DEFAULT.LOCAL.QUEUE on queue manager HTTP.QM.
  • Run this command to get (an WMQ get, not HTTP get) messages of the queue java -cp . HTTPDELETE SYSTEM.DEFAULT.LOCAL.QUEUE localhost:8080 mq.

Get going with a clean Geronimo and curl

  • Verify that the queue manager HTTP.QM is started on your system.
  • Download Geronimo 1.1.1 from here, extract the archive.
  • Start Geronimo
    • Open a command window in GERONIMO_HOME\bin
    • Issue this command: SET JAVA_HOME=PATH_TO_IBM_JAVA. Substitute PATH_TO_IBM_JAVA with a path to an existing IBM Java 1.5 runtime (one is included in the samples package explained above). Using a Sun Java runtime will fail, see the Using JCA article at the IBM site.
    • Execute startup.bat
    • Geronimo is now started.
  • Deploy the WebSphere MQ J2EEConnectorArchitecture (JCA) resource adapter
    • Open the Geronimo Console by pointing your favourite browser to http://localhost:8080/console, log in using system/manager.
    • Open Console Navigation > Applications > Deploy New
      • Archive: WMQ_HOME\Java\lib\jca\wmq.jmsra.rar
      • Plan: ma0y.samples\deployedFiles\WASCEPlans\geronimo-ra.xml
      • Click Install
  • Deploy the WMQHTTP web application archive
    • Open the Geronimo Console by pointing your favourite browser to http://localhost:8080/console, log in using system/manager.
    • Open Console Navigation > Applications > Deploy New
      • Archive: ma0y.samples\deployedFiles\WMQHTTP.war
      • Plan: ma0y.samples\deployedFiles\WASCEPlans\geronimo-web.xml (if you use the geronimo jetty bundle replace tomcat with jetty within the file)
      • Click Install
  • Start testing

Colclusion

  • Works like a charm (except for the IBM Java runtime dependency)
  • Not yet supported (Category 2 support pack), but most likely will be in the near future.
  • Heavy-weigh, needs an application server and resource adapter.
About these ads

Filed under: ibm, MA0Y, mq, support pack, wmq

5 Responses

  1. [...] has already been reported in several blogs, IBM has released a new supportpac for exposing WebSphere MQ queues and topics as HTTP [...]

  2. Prem Bairoliya says:

    Hi,

    I was able to run the WAS CE edition (part of sample.zip). However wasnt able to change the default from HTTP.QM.

    Tried the same with clean Geronimo & even with the steps mentioned I got the following error

    C:\Program Files\IBM\WebSphere MQ HTTP\P2PConsole>java -classpath . HTTPPOST HTT
    P.TESTQUEUE
    HTTP POST Sample start
    Target server is ‘localhost:8080′
    Target queue is ‘HTTP.TESTQUEUE’
    Target context-root is ‘mq’
    ttt
    There has been an error trying to POST a message to ‘http://localhost:8080/mq/ms
    g/queue/HTTP.TESTQUEUE’. HTTP error response follows…
    Apache Tomcat/5.5.15 – Error report HTTP Status 404 – /mq/msg/queue/H
    TTP.TESTQUEUEtype Status reportmessage /mq/msg/queue/HTTP.TESTQUEUEdescription
    The requested resource (/mq/msg/queue/HTTP.TESTQUEUE) is not available.Apache Tomcat/5.5.15
    HTTP POST Sample end

    Can you help me figure this out.

    Thanks

  3. Prem Bairoliya says:

    Just when I posted the problem, I realised that we need to redeploy the web app.

    Now it is working fine. Thanks for the steps to use a clean Geronimo steps. You have saved me a lot of effort

  4. Niklas Nilsson says:

    Glad to see that the clean Geronimo process helped you out. It’s my intention to get back to the subject with a deeper ananlysis further on.

  5. tom morrice says:

    How could we change default qmanager from HTTP.QM to a different one?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Disclaimer

The information in this blog is provided “AS IS” with no warranties.

The postings on this site are my own and don’t necessarily represent Zystems’s positions, strategies or opinions.

Contact

del.icio.us

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: