VIDEO – How to test a web service using HP’s LoadRunner

This video shows how to test a web service using HP’s LoadRunner. I also demonstrate how to validate a web service response using the LR_XML_FIND function:


To see how to test a RESTful web service check out my post How to test a RESTful web service using HP’s LoadRunner


  1. Aravindd says

    I am going thru your video and I have HP Loadrunner 11 trial installed and was trying to use this url to import http://localhost:24240/HPFlights_SOAP?wsdl
    getting this error

    can not fetch WSDL data: http://localhost:24240/HPFlights_SOAP?wsdl
    The specified WSDL may be incompatible with the selected toolkit.
    Try using a different toolkit

    My localhost is up and running. I pinged and tested.
    Is there anyway to get around this are is there any other url I can try to practice.
    Appreciate your help.


    • Joe Colantonio says

      @Aravindd: I usually get that error if I try to import the WSDL when the application is not running.
      For the video example the web service I’m using is a sample flight application that came with HP Service Test 11.  If the sample flight application is not running and I try to import the WSDL I get the same error. Make sure you have the sample application up and running. If you don’t have the sample application you can get it by downloading HP’s Function Testing 11 eval from:^1352_4000_100__

      Hope that helps.



  2. Aravindd says

    Hi Joe,
    Thanks for the reply.
    I have Loadrunner 11 Eval Version installed, and it came HP Web Tours App. The webserver(localhost) is started and the application is up and running. Why cant I use that App. Doesnt it come with the WSDL’s.
    Or did you use the HP’s Function Testing 11 eval’s Application instead of HP Loadrunner eval’s App and used Loadrunner webservices to import the wsdl. Please explain.


    • Joe Colantonio says

      @Aravindd: Sorry for the confusion – I’m not using the flight application sample that came with LR (that is a web app). I’m using the Sample Flight application that came with HP’s Functional test tool “Service Test 11′ which is a “web service” version of the flight application. I then used Loadrunner’s Web Service protocol to import the ServiceTest WSDL. You could also take a look at : for other webservices to try.

  3. Aravindd says

    Hi Joe,
    Thanks for your immediate response.
    I will install HP Service test 11 and try the LR and let you know.


  4. Joel Wingert says


    No offense, but…

    I tried using this video to learn the lr_xml_find function, but it’s way to blurry and the video cuts out a few important phrases, such as exactly what string are you using for the Xpath. The video cuts that part of the audio out, and the video is too blurry to see what you are putting in there.


    • Joe Colantonio says

      Hi Joel – Sorry about that – let me dbl check and make sure I posted the right video— I’ll create a new video if the current one somehow got corrupted. Thanks for the feedback!

    • Joe Colantonio says

      Joel Wingert » Unfortunately is looks like I delete the original pre-edited video. It may take me a few days to redo. The code for the LR_XML_Find that I used for the video is:


  5. Joel Wingert says

    Ok thanx much… Sorry if I sounded brash… It’s just the way it came out, so to speak, but no ill was intended…

  6. madhuri says

    I feel the video is not so clear and also felt the screens turned so fast which is a little hard to follow for beginners.So when u update ur next video make sure u go slow and clear.

    Thank You so much for ur help!

    • Joe Colantonio says

      madhuri » Thanks for the advice madhur! I’ll keep it in mind next time I post a video. I try to keep my videos under 5 minutes so I think that is part of the problem. Also my newer video’s picture quality should be better. Cheer~Joe

  7. Shrenik says

    I am scripting for 2 way SSL web service scripting. I can open WSDL URL in IE after giving private key.
    While trying to import WSDL in LR 11, I am getting error saying “the specified wsdl may be incompatible with the selected toolkit”.


    • Joe Colantonio says

      Shrenik » Hi Shrenik – rather than try to import the WSDL have you tried to use the ‘Import Soap’ feature instead?

  8. Dipak says

    Hello Joe,
    Thanks for the vedio. I have imported the WSDL file. The payload for this WSDL looks like below. When I import it the values I see in LR as . Though I am able to execte the script with out any errors but message does not pass though. Your help is appreciated.

  9. Manish says

    Hi Joe,

    I tried the add webservice call in LR 11.5 and its working fine but when i try the same webservice in LR 9.5, its giving me error-

    InvokeMethod failed- org.xml.sax.SAXException:Bad envelope tag: html
    Details-Error while retrieving body- cannot parse output parameters.

    Could you please help me in resolving this error.


  10. Vishal Saxena says

    Hello Joe,

    I have resolved my issue to some extent. The error message I was getting earlier was due to misplaced “Mode=HTML”, “RecContentType=text/xml”.

    Now, I am stuck with another error message “Error -26628: HTTP Status-Code=403 (Forbidden)”. I have also tried adding web_set_user(“username”,password”, host:port”); but still the request fails.
    The request ask for its authentication when it is hitted on explorer.
    Can you please suggest.

    Vishal Saxena

    • says

      Vishal Saxena » For 403 errors when using NTLM authentication try verify the following:
      1. Make sure that information in web_set_user is correct.

      Username: usr
      Password: my_passwd
      Domain: spark
      Web server name: lazarus
      Port: 80

      Given the above, the function should be

      web_set_user(“spark\\usr”, “my_passwd”, “lazarus:80″);

      The domain name “spark” followed by a double backslash must be appended before the username.
      NTLM Authentication is supported by Sockets Replay Engine (default) from LoadRunner 7.5 and above.
      Make sure that there are no special characters in the username/password. Special characters include (:;&*\”/#~,?{}$%|<>+.”@^()[]+-)\\.

      2. Try to add the following statement before the web_set_user function. This forces the connection to the server to a particular protocol rather than letting the server suggest one during the connection handshake:

      web_set_sockets_option(“SSL_VERSION”, “3”);

      3. Replay your script in the extended log with “Advance trace” to verify the information sent to your server. Then, compare the header request of the execution log with the one that was used during recording from the Recording Log (for Single Protocol) or Generation Log (for Multiple Protocol). If there is missing information, add it to the script using a web_add_cookie statement. For example, if you see “SMCHALLENGE=Yes” in the Recording or Generation Log, but not on the execution log, add the following to the script before the web_url request:

      web_add_cookie(“SMCHALLENGE=Yes ; path…; domain= …)

  11. Vishal Saxena says

    In addition to my earlier post , to share with you the error that is being thrown by the application is,
    h2> Access is denied. \r\n
    Action.c(19): \r\n
    Action.c(19): \r\n
    Action.c(19): \r\n
    Action.c(19): Description: An error occurred while accessing the resources required
    Action.c(19): to serve this request. The server may not be configured for access to the requested URL.\r
    Action.c(19): \n
    Action.c(19): \r\n
    Action.c(19): \r\n
    Action.c(19): Error message 401.2.: Unauthorized: Logon failed due to server configu
    Action.c(19): ration.  Verify that you have permission to view this directory or page based on the
    Action.c(19): credentials you supplied and the authentication methods enabled on the Web server.  C
    Action.c(19): ontact the Web server’s administrator for additional assistance.\r\n
    I even tried adding below statements,
    web_add_header(“Host”, “server”);
    web_add_header(“Authorization”, “username:password”);

    Any help shall be appriciated.

    Vishal Saxena

  12. Vishal Saxena says

    If it would have been, I might not have asked :). Surely, I am having those permissions, otherwise it would have failed doing manually also. Am I correct Sir? Thanks Anyways. Will update the error cause at your forum, once I resolve it.

  13. Vishal Saxena says

    Hello Joe,

    First of all, I would llike to share the reason for failure of my custom request as discussed in previous posts.
    It was the authorization part, that was being incorrectly sent. Below was the resolution I found & it worked,
    – Earlier I was using ,web_add_header(“Authorization”, lr_eval_string(“Basic {p_Username}””:””{p_Password}”));
    which was WRONG.
    The string {p_Username}””:””{p_Password} was encoded by base64 encoder, therefore passing the encoded string actually worked.
    This was checked from SOAP UI HTTP Log.

    Now, I am again stuck while making a test-run on Controller. Below are the RTS details-
    Use Winlet replay engine instead of Socket engine (script fails using Socket)
    Issue- Vusers does not increases beyond INIT state after 2-3 are on run, when I try to execute the same with localhost as agent, It ramps up to 20 vuser. This is a very strange behaviour, But I am actually stuck due to this.
    Your advice might prove worth again.

    Please help. Thanks in Advance Joe.
    Vishal Saxena

  14. Bob says

    hello Joe,
    i am try to set transaction pass and fail base on web service output value. i set web service output value as following


    then i put parameter in output message as following


    here, i am having issue. where i am trying to set transaction pass or fail base on web service output of result.

    if (lr_output_message(lr_eval_string(“{result}”)) == “APPROVE”)

    lr_end_transaction(“XXXXX”, LR_PASS);

    lr_end_transaction(“XXXXX”, LR_FAIL);

    return 0);

    can you tell me where am i making mistake in If statement? thanks

  15. uft says

    Hello Joe,

    How to parametrize the security Username & Passswords fields under HTTP tab for any API Test in UFT? Right now I can only enter a specific field value and I want to iterate it with multiple values.
    In ST 9.5 I can use the web_set_user command for same.

    Please assist.


  16. javeed says

    Hi Joe,

    I am unable to import the xml/wsdl files in Loadrunner and getting error as “The specified WSDL may be incompatible with the selected toolkit.Try using a different toolkit”. Please give me the solution to fix the above one.


Leave a Reply

Your email address will not be published. Required fields are marked *