Using WSDL files to Create WebService Scripts

Hello Folks,

Today I’m here to show you how to use one of the easiest scripting protocols on LoadRunner, WebService. Being simple doesn’t mean that the protocol it’s not powerful. A lot of large enterprise applications and web portals use WebServices on the back office processes.

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 very simple, not much to be done!

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

That’s It! On the next guide I plan to show you how to create WebService scripts using application trace files.

See you next time!

Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+

9 thoughts on “Using WSDL files to Create WebService Scripts

  1. The video is private. Could you please add me to the filter so that I can watch it?
    -Oskr Villegas

    Thanks man :)

  2. Hi i hv done this thanks…. but i am unable to see the array in wsdl link to input the values it just showing one item while there are 5 items in that particular tab. How i can see all those values in array and input that in my script.

    • Hi Madiha,
      That is interesting. Usually LR populates the list with all WSDL fields. Can you send a screenshot?


    • Hi All,

      I am trying to test secured webservice but i have given username,password in Authenticatin settings but still it is displaying as LastHTTPResponse code,can any one help me how to test a webservice where it is having authenticatin settings.

  3. what is the wsdl path for lr sample application?

  4. Hello Martin,
    Iam new to load runner and webservices as well, after googling i cam to know about webservice a bit.
    Your explanation for creating script for web service in loadrunner is really helpfull for me thanks alot for ur explanation.
    can you please explain how to create a script for webservice using an example and also explain how it works.Even you can mail to my id.I need to give a presentaion on this topic so please kindly give reply asap.

    • Hello Mayu,
      Webservice is one of the most simple protocols on LoadRunner. Web Services are pretty much a HTTP posts where the body contains an XML message.
      If you want to create a Web Service script from a sample file, the easiest way would be to use the “Import SOAP” tool on VUGen when using the Web Services protocol.
      Just click on Import SOAP and select the sample XML message. This should create a new web service call on the script with the provided message.
      If you need more info on Web Services, Wikipedia is a great resource:


Leave a Reply