サンプルを実行する前に、サンプルをビルドしてください。<sdk_install_dir>/samples/wsnt-axis/sample-axis.properties
ファイルの SERVICE_ADDRESS の値を、NotificationConsumerService Web サービスの URL に設定してあることを確認してください。
<sdk_install_dir>/samples/wsnt-axis/build.xml
ファイルには、イベント・ソースのサンプルを起動する send.event.wsn10
という名前のターゲットがあります。
ハードコーディングされたイベントを Web サービスに送信するには、以下のコマンドを実行します。
ハードコーディングされたイベントを Enterprise Console Web サービス・アダプターに送信するには、以下のコマンドを実行します。
set JAVA_HOME=<JDK の場所>
set ANT_HOME=<ANT インストールの場所>
cd <sdk_install_dir>\samples\wsnt-axis
%ANT_HOME%\bin\ant send.event.wsn10 <WS-Notification 1.0 クライアント>
%ANT_HOME%\bin\ant send.event.wsn13 <WS-Notification 1.3 クライアント>
export JAVA_HOME=<JDK の場所>
export ANT_HOME=<ANT インストールの場所>
cd <sdk_install_dir>/samples/wsnt-axis
$ANT_HOME/bin/ant send.event.wsn10 <WS-Notification 1.0 クライアント>
$ANT_HOME/bin/ant send.event.wsn13 <WS-Notification 1.3 クライアント>
このコマンドにより、ハードコーディングされたイベントが、SERVICE_ADDRESS ロケーションで稼働する Web サービスに送信されます。
注: 以下のメッセージは無視して構いません。
[java] - Unable to find required classes (javax.activation.DataHandler and .mail.internet.MimeMultipart). Attachment support is disabled.
サンプルをテストするには、以下のステップを実行してください。
samples/wsnt-axis/sample-axis.properties
ファイルを変更して、SERVICE_ADDRESS の値を以下のように設定します。
http://adapter_hostname:8080/axis/services/NotificationConsumer10Soapまたは
http://adapter_hostname:8080/axis/services/NotificationConsumer13Soap(それぞれ WS-Notification 1.0 または WS-Notification 1.3 の場合)
親トピック
Apache Axis のサンプル