4

I would like to use a custom <iq> stanza with tsung (to test ejabberd).

Suppose my <iq> looks like this:

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

How would I add that into a tsung configuration like:

<transaction name="online">
    <request>
        <jabber type="chat" ack="no_ack" size="16" destination="online"</jabber>
    </request>
</transaction>
<thinktime value="300"></thinktime>`
John Hascall
  • 9,176
  • 6
  • 48
  • 72
Hari Haran
  • 1,543
  • 4
  • 13
  • 25

1 Answers1

0

Take a look at Section 6.6.3.11. raw XML here. You can specify custom XML stanzas using raw type jabber requests.

So your request above would look like this(make sure you escape your 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>
Balázs Palkó
  • 641
  • 5
  • 8