我们如何定制用于在Openfire服务器中发送消息的tsung脚本?

时间:2015-05-22 05:18:01

标签: erlang openfire tsung

Tsung片段:

<transaction name="sendmessage">
<request> <jabber type="chat" ack="no_ack" size="56" destination="online" /> </request>
</transaction>

它生成以下请求,

<message id='4777' to='testserver270@domain.com' type='chat'>
    <body>qxvmvtglimieyhemzlxcqxvmvtglimieyhemzlxcvtglimieyhemzlxc</body>
</message>

如何自定义tsung脚本以获取以下请求,

<message id='395' to='testserver4@dmain.com' type='chat'>
    <msgid>a8aa6f8f-f162-4f1f-b9a0-834180c26fe0</msgid>      
    <sessionkey></sessionkey>      
    <creationtime>1432204640009</creationtime>      
    <senttime>1432204640009</senttime>
    <msgtype>9001</msgtype>      
    <body>02A8E47665F91C415B2E732E105E1FA68E01AF2EA9D03AE8374343A68683</body>      
    <thread>yyMz65</thread>
</message>

我已尝试在jabber标记中使用数据并传递了我的自定义标记init,并获得了以下请求。

<message id='395' to='testserver4@chat.test.cryptall.com' type='chat'>
    <body>
        <msgid>a8aa6f8f-f162-4f1f-b9a0-834180c26fe0</msgid>      
        <sessionkey></sessionkey>      
        <creationtime>1432204640009</creationtime>      
        <senttime>1432204640009</senttime>
        <msgtype>9001</msgtype>      
        <body>4A8E47665F91C415B2E732E105E1FA68E01AF2EA9D03AE8374343A68683</body>      
        <thread>yyMz65</thread>
    </body>
</message>

0 个答案:

没有答案