[Tsung] Dynamic variables, Vcards, TLS, and service discovery

Megan Chinburg megan.chinburg at jivesoftware.com
Tue Dec 19 23:08:15 CET 2006


HI Mickael,
Yes, I did use the %%, I tried it both ways, I was not sure at the time if
the Jabber protocols were different from the HTTP.  I did read over the
documentation, and I see the docs refer to an HTTP scenario, is it the same
for Jabber?

<!-- Current State: this works..But...I can't get dynamic sub. to work. This
will retrieve one¹s own vcard-->
    <request subst=²true²><jabber type="raw"  ack="no_ack"
        data="&lt;iq
            from='user1 at dhcp-client-236'
            type='get'
            id='v1'&gt;
          &lt;vCard xmlns='vcard-temp'/&gt;
        &lt;/iq&gt; " />
        </request>


I¹d like to be able to use dynamic sub to have each user randomly choose an
online users username to emulate the process of requesting another users
Vcard.  In the ³to² field I would like to have tsung populate something
like:
user243 at servername
Or 
user9937 at servername
I sent another email to the list concerning my attempt to extend the
ts_jabber_common.erl file to add a vcard_get function rather than trying to
use dynamic sub in the xml.  If you know how to do what I¹m attempting here,
could you please let me know.

<!-- This does not work, but I might be using the wrong function call. -->
    <request subst=²true²><jabber type="raw"  ack="no_ack"
        data="&lt;iq
            to='%%ts_user_server:get_online at servername%%'
            type='get'
            id='v1'&gt;
          &lt;vCard xmlns='vcard-temp'/&gt;
        &lt;/iq&gt; " />
        </request>

Thank you
--Megan

On 12/15/06 12:15 AM, "Mickaël Rémond" <mickael.remond at process-one.net>
wrote:

> Hello,
> 
> Le 15 déc. 06 à 00:22, Megan Chinburg a écrit :
> 
>> However, I have not been able to get the dynamic sub to work, perhaps I¹m
>> missing something?
>>  
>>      <request subst="true"><jabber type="raw" ack="no_ack"
>>          data="&lt;iq
>>          to='ts_user_server:get_unique_id at servername'
>>          type='get'
>>          id='v3'&gt;
>>        &lt;vCard xmlns='vcard-temp'/&gt;
>>      &lt;/iq&gt;"></jabber></request>
> 
> Did you use percent signs ?
> 
> From the documentation:
> 
> http://www.process-one.net/en/projects/tsung/docs/user_manual.html#htoc38
> 
> Those mark-up are of the form %%Module:Function%%. Substitutions are executed
> on a request-by-request basis, only if the request tag has the attribute
> subst="true".
> 
> <session name="rec20040316-08:47" probability="100" type="ts_http">
>  <request subst="true">
>   <http url="/echo?id=%%ts_user_server:get_unique_id%%" method="GET">
>   </http></request>
> </session>
> 
>  
> -- 
> Mickaël Rémond
>  http://www.process-one.net/
> 
>  
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.process-one.net/pipermail/tsung-users/attachments/20061219/5001e367/attachment.html


More information about the Tsung-users mailing list