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

How to capture a Variable from XML repsonse

Recommended Posts

Guest chumbawumba

I am trying to capture a variable from an XML response which is generated by a "page" I create in WAPT. The XML response has a value, which is different each time the page is loaded (it's a user ID). I then need to use this variable in further pages within the iteration.

 

I've created a page which has several parameters. When these parameters are passes to the webservice I'm talking to, the service crates a user with the parameters I've requested and responds with a "success" XML response, which has that user's ID as a value. I've created a variable on the same page, called USER_ID and added a function of type "search parameter". The left and right boundaries are the XML tags which surround the value of the user ID.

 

When I then create another page, which is an HMTL get, I add a parameter USER_ID (which is what the web-service needs) and set it to be $Var(USER_ID).

 

in the logs, the URL in the header of the page does not contain the value, it just saus "user_id=", with no "1234"

 

HELP!?? This must be something WAPT can do. If this works, we'll buy the product as need to do some load testing and this looks to be the right tool.

Share this post


Link to post
Share on other sites
Guest angela
I am trying to capture a variable from an XML response which is generated by a "page" I create in WAPT. The XML response has a value, which is different each time the page is loaded (it's a user ID). I then need to use this variable in further pages within the iteration.

 

I've created a page which has several parameters. When these parameters are passes to the webservice I'm talking to, the service crates a user with the parameters I've requested and responds with a "success" XML response, which has that user's ID as a value. I've created a variable on the same page, called USER_ID and added a function of type "search parameter". The left and right boundaries are the XML tags which surround the value of the user ID.

 

When I then create another page, which is an HMTL get, I add a parameter USER_ID (which is what the web-service needs) and set it to be $Var(USER_ID).

 

in the logs, the URL in the header of the page does not contain the value, it just saus "user_id=", with no "1234"

 

HELP!?? This must be something WAPT can do. If this works, we'll buy the product as need to do some load testing and this looks to be the right tool.

 

 

Yes, WAPT can definitely do this. As far as I can see from your description, you do everything correctly. However, it seems that you made a mistake somewhere, so please attach or send to support your profile, full and error logs from WAPT, and we will check why the variable does not work.

 

 

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...