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.
Advertisements

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

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