WebSphere Message Broker Set up for Cúram

Process Overview

The Cúram Event Adaptor publishes events to a SOAP endpoint. The WebSphere Message Broker installation which forms part of the Intelligent Operations Center can be used to expose a SOAP endpoint reference in order to receive the messages published by the Cúram Event Adaptor.

Messages published by the Cúram Event Adaptor to the SOAP endpoint are in a slightly different format to that required by the Intelligent Operations Center. For example, the event is wrapped in a SOAP envelope. A sample CAP event as published by the Cúram Event Adapter is supplied below. WebSphere Message Broker can also be used to extract the CAP message from the SOAP envelope, and remove the other extra elements so that it is in the precise CAP message format required by Intelligent Operations Center. Finally, WebSphere Message Broker can be used to forward the transformed CAP message to the Intelligent Operations Center by routing the messages to the appropriate Intelligent Operations Center input queue.

Sample CAP Event

The following is a sample CAP event with a SOAP envelope as sent by the Cúram Event Adaptor:

Figure 1. Sample CAP Event with SOAP envelope
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Body>
    <ns1:publishEvent xmlns:ns1="http://remote.bs.publiclayer.ws.ea.curam">
      <xmlMessage>
        <cap:alert xmlns:cap="urn:oasis:names:tc:emergency:cap:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:emergency:cap:1.2-CAP-v1.2-os.xsd">
              <cap:identifier>d2a42209-33a5-4fcc-8658-0fc2c08c95da</cap:identifier>
              <cap:sender>IBMCuramSample</cap:sender>
              <cap:sent>2012-07-12T15:11:14+01:00</cap:sent>
              <cap:status>Actual</cap:status>
              <cap:msgType>Alert</cap:msgType>
              <cap:scope>Public</cap:scope>
              <cap:code>KPI</cap:code>
              <cap:info>
                <cap:category>Other</cap:category>
                <cap:event>ea.ipa.pd</cap:event>
                <cap:urgency>Unknown</cap:urgency>
                <cap:severity>Moderate</cap:severity>
                <cap:certainty>Observed</cap:certainty>
                <cap:headline>Sample CAP Event</cap:headline>
                <cap:description>Sample CAP Event Description</cap:description>
                <cap:onset>2012-07-12T15:11:14+01:00</cap:onset>
                <cap:senderName>IBMCuramSample</cap:senderName>
                <cap:parameter>
                  <cap:valueName>DisposalDateTime</cap:valueName>
                  <cap:value>2012-07-12 15:11:14</cap:value>
                </cap:parameter>
                <cap:parameter>
                  <cap:valueName>DisposalDuration</cap:valueName>
                  <cap:value>0</cap:value>
                </cap:parameter>
                <cap:parameter>
                  <cap:valueName>ProgramType</cap:valueName>
                  <cap:value>areference</cap:value>
                </cap:parameter>
                <cap:parameter>
                  <cap:valueName>DisposalResult</cap:valueName>
                  <cap:value>Deny</cap:value>
                </cap:parameter>
              </cap:info>
            </cap:alert>
          </xmlMessage>
      </ns1:publishEvent>
  </soapenv:Body>
</soapenv:Envelope>

Create a WebSphere Message Broker Flow

This section describes how to create a Message Broker Flow within the Intelligent Operations Center WebSphere Message Broker installation in order to receive and process the CAP messages sent by the Cúram Event Adaptor. This flow will accept Cúram SOAP messages, transform these messages into the precise format required by the Intelligent Operations Center, and then forward the modified messages to the Intelligent Operations Center input queue. The steps involved in creating the flow are as follows:

  1. Create a new message flow file (.msgflow) within WebSphere Message Broker Toolkit.
  2. SOAP Input: Create a SOAPInput node to expose a SOAP endpoint to accept and process the messages sent by the Cúram Event Adaptor. The node must be configured using the EventAdaptorService.wsdl deployable WSDL file. This file can found in EJBServer\components\EventAdaptor\axis\EventAdaptorService on a development installation for Cúram.
  3. Create nodes to convert the message sent by the Cúram Event Adaptor into the exact format expected by the Intelligent Operations Center. This involves removing the SOAP envelope, extracting the CAP message, and removing the extra HTTP headers. The following steps can be used to achieve this:
    1. SOAP Extract: Create a SOAPExtract node to remove the SOAP envelope, allowing just the body of a SOAP message to be processed.
    2. XSL Transform: Use an XSL transformation to extract the CAP message located within the parent <xmlMessage> element. For example. the following XSL transformation could be used as a basis for this:
      Figure 2. Sample XSL Transformation
      <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:output indent="yes"/>
        <xsl:template match="/">
        	<xsl:copy-of select="//xmlMessage/node()"/>
        </xsl:template>
      </xsl:stylesheet>
    3. HTTP Header: Use the HTTPHeader node to delete all HTTP headers from the input message.
    4. Reset Content Descriptor: Use a ResetContentDescriptor node to request that the message is reparsed using the XMLNSC parser.
  4. MQ Output: Finally, the transformed message needs to be delivered to the Intelligent Operations Center IOC.CAP.IN MQ queue. Use an MQOutput node to deliver it to the IOC.CAP.IN MQ queue.

After creating the message flow, a BAR file should be generated. This BAR file should then be deployed to the Intelligent Operations Center WebSphere Message Broker instance.