The Web Services Description Language or WSDL is an XML-based interface definition language that is used for describing the functionality offered by a web service. It is often used in combination with SOAP and XML Schema to provide web services over the Internet. You can follow the below-mentioned steps to build a JMeter test plan for WSDL services.

  1. Launch the JMeter GUI
  2. Add the Thread group as explained above

For creating web service we have 2 options in JMeter

  1. Using HTTP request sampler
  2. Using SOAP/XML-RPC Request sampler (Deprecated now) (SOAP/XML-RPC sampler has been deprecated in recent versions of JMeter and it is not advisable to use)
Using HTTP Request Sampler
  1. Right-click mouse button to get the Add menu
  2. Select Add > Sampler > HTTP Request
  3. In HTTP Request, give the server name inside server name text field ( for eg www.webservicex.com)
  4. Mention Protocol as HTTP or HTTPS according to your web service implementation
  5. Choose Method as POST
  6. Inside the path, mention the web service URL or method which you want to hit
  7. Navigate to “Body Data” tab
  8. Provide the complete SOAP envelope body of web service method here

Now we need to add headers inside the HTTP request which contain metadata, are tightly defined by the HTTP spec. They can only contain plain text and must be formatted in a certain manner. To specify headers, you’ll need the HTTP Header Manager

  1. Right Click on HTTP request sample
  2. Navigate to Config element > Header Manager
  3. Inside Header Manager, add the field as “Content-Type” and its value as “text/XML”
  4. Now your SOAP request has been simulated and you can execute the test
  5. You can append the SOAP envelope body with Parameterization and Correlation concepts as described above and make your request dynamic
Adding Sampler – SOAP/XML-RPC Request
  1. Right-click mouse button to get the Add menu
  2. Select Add > Sampler > SOAP/XML-RPC Request
  3. Enter the web service URL inside the URL field for e.g. ( http://www.webservicex.com/CurrencyConvertor.asmx)
  4. Inside SOAP/XML-RPC Data, enter the SOAP body of the method which we want to hit
  5. You are ready to hit the SOAP request.

Now you can implement the Correlation and Parameterization concepts to make the SOAP request dynamic.

You may also like: Correlation and Parameterization in JMeter

Leave a comment

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