Cúram용 WebSphere Message Broker 설정

프로세스 개요

Cúram 이벤트 어댑터는 SOAP 엔드포인트에 이벤트를 공개합니다. Cúram 이벤트 어댑터가 공개한 메시지를 받도록 Intelligent Operations Center의 일부를 형성하는 WebSphere Message Broker 설치를 사용하여 SOAP 엔드포인트 참조를 노출할 수 있습니다.

Cúram 이벤트 어댑터가 SOAP 엔드포인트에 공개한 메시지의 형식은 Intelligent Operations Center에 필요한 형식과 약간 다릅니다. 예를 들어, 이벤트는 SOAP 엔벨로프로 랩핑됩니다. Cúram Event Adapter에 공개된 샘플 CAP 이벤트가 아래 제공됩니다. WebSphere Message Broker는 CAP 메시지가 Intelligenct Operations Center에 필요한 정확한 CAP 메시지 형식이 되도록 SOAP 엔벨로프에서 CAP 메시지를 추출하여 다른 외부 요소를 제거하는 데도 사용합니다. 마지막으로 WebSphere Message Broker는 적절한 Intelligent Operations Center 입력 큐로 메시지의 경로를 지정하여 변환된 CAP 메시지를 Intelligent Operations Center로 전달하는 데 사용할 수 있습니다.

샘플 CAP 이벤트

다음은 Cúram Event Adapter가 보낸 SOAP 엔벨로프를 사용하는 샘플 CAP 이벤트입니다.

그림 1. SOAP 엔벨로프 사용 샘플 CAP 이벤트
<?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>

WebSphere Message Broker 플로우 작성

이 절에서는 Cúram 이벤트 어댑터가 보낸 CAP 메시지를 받아 처리하도록 Intelligent Operations Center WebSphere Message Broker 설치에 메시지 브로커 플로우를 작성하는 방법에 대해 설명합니다. 이 플로우는 Cúram SOAP 메시지를 수락하여 Intelligent Operations Center에 필요한 정확한 형식으로 변환한 다음 수정된 메시지를 Intelligent Operations Center 입력 큐에 전달합니다. 플로우 작성에 관련된 단계는 다음과 같습니다.

  1. WebSphere Message Broker 툴킷에서 새 메시지 플로우 파일(.msgflow)을 작성하십시오.
  2. SOAP 입력: SOAPInput 노드를 작성하여 Cúram 이벤트 어댑터에서 보낸 메시지를 수락하여 처리하도록 SOAP 엔드포인트를 공개하십시오. EventAdaptorService.wsdl 배치 가능 WSDL 파일을 사용하여 노드를 구성해야 합니다. 이 파일은 Cúram 개발 설치의 EJBServer\components\EventAdaptor\axis\EventAdaptorService에 있습니다.
  3. Cúram 이벤트 어댑터가 보낸 메시지를 Intelligent Operations Center에 필요한 정확한 형식으로 변환하도록 노드를 작성하십시오. 이 작업을 수행하려면 SOAP 엔벨로프를 제거하고 CAP 메시지를 추출하며 추가 HTTP 헤더를 제거해야 합니다. 다음 단계를 사용하여 이 작업을 수행할 수 있습니다.
    1. SOAP 추출: SOAP 메시지의 본문만 처리할 수 있도록 SOAPExtract 노드를 작성하여 SOAP 엔벨로프를 제거하십시오.
    2. XSL 변환: XSL 변환을 사용하여 상위 <xmlMessage> 요소에 있는 CAP 메시지를 추출하십시오. 예를 들어, 다음 XSL 변환을 이 작업의 기초로 사용할 수 있습니다.
      그림 2. 샘플 XSL 변환
      <?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 헤더: HTTPHeader 노드를 사용하여 입력 메시지에서 모든 HTTP 헤더를 삭제하십시오.
    4. 컨텐츠 디스크립터 다시 설정: XMLNSC 구문 분석기를 사용하여 메시지를 다시 구문 분석하도록 요청하는 데 ResetContentDescriptor 노드를 사용하십시오.
  4. MQ 결과: 마지막으로 변환된 메시지를 Intelligent Operations Center IOC.CAP.IN MQ 큐에 제공해야 합니다. MQOutput 노드를 사용하여 IOC.CAP.IN MQ 큐에 제공하십시오.

메시지 플로우를 작성하고 나면 BAR 파일이 생성되어야 합니다. 그러면 이 BAR 파일을 Intelligent Operations Center WebSphere Message Broker 인스턴스에 배치해야 합니다.