サンプルの実行

サンプルを実行する前に、サンプルをビルドします。<sdk_install_dir>/samples/wsnt-was/sample-was.properties ファイルの SERVICE_ADDRESS の値を、NotificationConsumerService Web サービスの URL に設定してあることを確認してください。<sdk_install_dir>/samples/wsnt-was/build.xml ファイルには、 イベント・ソース・アプリケーションを起動する send.event.wsn10 という名前のターゲットがあります。

ハードコーディングされたイベントを Web サービスに送信するには、以下のコマンドを実行します。

cd <sdk_install_dir>\samples\wsnt-was
%WAS_HOME%\bin\ws_ant send.event.wsn10      <WS-Notification 1.0 クライアント>
%WAS_HOME%\bin\ws_ant send.event.wsn13      <WS-Notification 1.3 クライアント>

cd <sdk_install_dir>/samples/wsnt-was
$WAS_HOME/bin/ws_ant send.event.wsn10      <WS-Notification 1.0 クライアント>
$WAS_HOME/bin/ws_ant send.event.wsn13      <WS-Notification 1.3 クライアント>

このコマンドにより、ハードコーディングされたイベントが、SERVICE_ADDRESS ロケーションで稼働する Web サービスに送信されます。

サンプルのテスト

サンプルをテストするには、以下のステップを実行してください。

  1. Common Event Infrastructure Web サービス・レシーバーがインストールされている WebSphere Application Server インスタンスを開始します。
  2. SDK 内の samples/wsnt-was/sample-was.properties ファイルを変更して、SERVICE_ADDRESS の値を以下のように設定します。
    http://receiver_hostname:9080/wsnt-was/services/NotificationConsumer10Soap
    または
    http://receiver_hostname:9080/wsnt-was/services/NotificationConsumer13Soap
    (それぞれ WS-Notification 1.0 または WS-Notification 1.3 の場合)
  3. Common Event Infrastructure Web サービス・レシーバーのトレースをオンにします。
  4. レシーバーによって WebSphere Application Server インスタンスの trace.log ファイルにログ記録されるメッセージを監視します。


親トピック
WebSphere Application Server のサンプル


関連トピック
WS-Notification サンプルのウォークスルー
サンプルのビルド
レシーバーの開始
レシーバーのトレース診断の使用可能化