【问题标题】:Using a custom <iq> stanza in tsung (for testing ejabberd)?在 tsung 中使用自定义 <iq> 节(用于测试 ejabberd)?
【发布时间】:2013-10-19 14:13:21
【问题描述】:

我想使用带有 tsung 的自定义 &lt;iq&gt; 节(以测试 ejabberd)。

假设我的&lt;iq&gt; 看起来像这样:

<iq type="get">
    <query Xmlns="jabberd:test:sample">
        <search term="l"></search>
     </query>
</iq> 

如何将其添加到 tsung 配置中,例如:

<transaction name="online">
    <request>
        <jabber type="chat" ack="no_ack" size="16" destination="online"</jabber>
    </request>
</transaction>
<thinktime value="300"></thinktime>`

【问题讨论】:

标签: ejabberd tsung


【解决方案1】:

查看第 6.6.3.11 节。原始 XML here。您可以使用原始类型的 jabber 请求指定自定义 XML 节。

所以你上面的请求看起来像这样(确保你转义了你的 XML):

<jabber type="raw" ack="no_ack"
 data="&lt;iq type=&quot;get&quot;
         &gt;&lt;query Xmlns=&quot;jabberd:test:sample&quot;&gt;
           &lt;search term=&quot;l&quot;&gt;&lt;/search&gt;
         &lt;/query&gt;
       &lt;/iq&gt;">
</jabber>

【讨论】:

    猜你喜欢
    • 2018-07-15
    • 2023-04-11
    • 1970-01-01
    • 2020-02-16
    • 2015-08-04
    • 2020-03-16
    • 2014-05-25
    • 1970-01-01
    • 2017-05-20
    相关资源
    最近更新 更多