HttpEndpoint ローカルデバッグツール
このツールは、Message Service をシミュレートして任意の http url に http/https メッセージ (リクエスト) をプッシュし、HttpEndpoint のテストとデバッグを支援します。
環境依存関係
このツールでは、Python バージョン 2.5 以上、3.0 未満が必要です。Windows と Linux の両方で使用できます。
ヘルプ
ツールをダウンロードし、必須のインストールではないフォルダー mns_topic_tool に入ります。
Version 1.0.0
- UpdateTime: 2016-04-20 ツールのダウンロード
機能:
HttpEndpoint の認証ロジックをテストするための notifymsg_withauth コマンドを提供します。
HttpEndpoint のメッセージパーサーのテストに役立つ notifymsg_withoutauth コマンドを提供します。
1. HttpEndpoint の認証ロジックのテスト
http/https リクエストを任意の http ホストに送信します。
コマンド形式:
python mns_topic_tool.py notifymsg_withauth --host=http(s)://xxx
http(s)://xxx は HttpEndpoint のアドレスです。
サンプル:
2. プッシュメッセージ本文の HttpEndpoint パーサーのテスト
メッセージ本文と形式情報がある http/https リクエストを任意の HttpEndpoint アドレスに送信します。
注意: HttpEndpoint では認証を行わないでください。このツールで送信されるリクエストはこのモードで認証に署名を追加しません。
コマンド形式
python mns_topic_tool.py notifymsg_withoutauth --host=http(s)://xxx [--uri=xxx] [--body=xxx] [--base64=true/false] [--format=xml/simplfied] [--topicowner=xxx] [--topicname=xxx] [--subscriber=xxx] [--subname=xxx] [--pubtime=xxx]
パラメーター | 説明 | デフォルト値 |
---|---|---|
uri | リクエスト uri | /notifications |
body | メッセージのコンテンツ | TestMessage |
base64 | base64 でエンコードするかどうかを示します。 | false |
format | 本文の形式: xml/simplfied | xml |
topicowner | メッセージ本文の TopicOwner | TestTopicOwner |
topicname | メッセージ本文の TopicName | TestTopicName |
subscriber | メッセージ本文のサブスクライバー | TestSubscriber |
subname | メッセージ本文のサブスクリプション名 | TestSubscriptionName |
pubtime | メッセージ本文のメッセージのパブリッシュ時刻 | 現在の時刻 |
サンプル: