Friday, July 26, 2013

Using WSDL files to Create WebService Scripts

There are several ways of scripting this king of application, but today I’ll show how to use .NET WSDL files to create a simple script. Instead of pasting several images on the post I thought it would be more productive to record a screen cast. So here it is, the first video guide of this blog:


The steps are :
  1. Create a new single protocol script using the Web Service protocol.
  2. Click on the “Manage Services” button on the top left corner.
  3. Click on the “Import” button.
  4. Select URL and then paste your WSDL file URL Remember that it should include the “?WSDL” string at the end.
  5. Click on the “Import” button and then OK.
  6. Back to the script view, click on the “Add Service Call” button.
  7. Select the service you just added on the “Service” drop down list.
  8. Select the call you want to add on the “Operation” drop down list.
  9. At this point, you will see a list of parameters (Input and Output) on the middle box.
  10. The Input parameters are the parameters you will use on your request. On the opposite way, Output parameters are the parameters returned by the server.
  11. Some input parameters are required and some are optional. You will notice the difference on the “Include argument in call” checkbox.
  12. The required parameters have this checkbox disabled.
  13. With this checkbox you can add optional parameters to the request.
  14. You can also set the values you’ll be sending by filling the “Value” text box.
  15. You can save the returned parameters by selecting the desired parameter under “Output Arguments” and selecting the “Save returned value in parameter” checkbox.
  16. Once you’re done with the arguments selection, click on the OK button. This will add the request to the script.
  17. Once the code is created, you can replace parameters, add static arguments and all sorts of things that can only be done in LoadRunner.
  18. Returned values will be saved on the selected parameters to be used later, in case you have more than once call per script (sequential steps).

5 comments:

Unknown said...

If I have 10 scripts, how can I use same url in all so that if any change is there in url if I change at one place it should effect in all scripts.

Unknown said...

If I have 10 scripts, how can I use same url in all so that if any change is there in url if I change at one place it should effect in all scripts.

Anonymous said...

Hi,

I am not able to move ahead after entering WSDL file URL.Getting error as "The specified WSDL maybe incompatible with the selected toolkit.Try using different toolkit."
Please help me with this.

Unknown said...

I am also facing the same issue- I also tried using different sample URL's but same result
I am not able to move ahead after entering WSDL file URL.Getting error as "The specified WSDL maybe incompatible with the selected toolkit.Try using different toolkit."
Please help me with this.

Unknown said...

I am not able to move ahead after entering WSDL file URL.Getting error as "The specified WSDL maybe incompatible with the selected toolkit.Try using different toolkit."
Please help me with this.
I have also tried using sample URL's but still get the same result. I'm using LR 12.53 version