Jump to content
WAPT Forum
Sign in to follow this  
Guest AJThomas

Variable in "POST raw data"

Recommended Posts

Guest AJThomas

I am testing a web service and using the "POST raw data" option to supply the XML. I need to generate a random charactrer string in each request, but so far I have not managed to generate one using any of the functions.

 

So how do I generate a random character string within the XML message?

 

Thanks in advance

Share this post


Link to post
Share on other sites
Guest angela
I am testing a web service and using the "POST raw data" option to supply the XML. I need to generate a random charactrer string in each request, but so far I have not managed to generate one using any of the functions.

 

So how do I generate a random character string within the XML message?

 

Thanks in advance

 

You can do this wih he function $Var. You need to crete a variable, initialize it with this functon and substitute its value in the row data.

Share this post


Link to post
Share on other sites
Guest AJThomas
You can do this wih he function $Var. Yoiu need t crete avariable, initialize it with this functon and substitute its value in the row data.

 

 

Hi,

 

I can create a variable, but it is just blank when it runs.

I create the variable called RandomText using $ARand(32,32) then in my XML I use <text>$Var(RandomText)</text> but when this runs I just get <text></text>.

 

Looking at your suggestion I don't really understand how to "initialize it" and how to "substitute its value", where am I going wrong?

 

 

Thanks again.

Share this post


Link to post
Share on other sites
Guest angela
Hi,

 

I can create a variable, but it is just blank when it runs.

I create the variable called RandomText using $ARand(32,32) then in my XML I use <text>$Var(RandomText)</text> but when this runs I just get <text></text>.

 

Looking at your suggestion I don't really understand how to "initialize it" and how to "substitute its value", where am I going wrong?

 

 

Thanks again.

 

You've done everything correctly, except one thing: you need to create a variable in the previous request.

 

I.e., you create a variable in requst #1, you can use it in request #2.

 

 

Share this post


Link to post
Share on other sites
Guest AJThomas
You've done everything correctly, except one thing: you need to create a variable in the previous request.

 

I.e., you create a variable in requst #1, you can use it in request #2.

 

 

OK. that's a problem, we only have one request.

 

How would I set up a dummy request that does nothing but set up a variable?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...