Adding a service request

You can use service request elements in tests to send a request to the service.

About this task

Complex service requests or verification points might have empty XML elements that are not needed in a test script. When playing back the test, you can skip such empty XML elements. In Window > Preferences > Test > Test editor > Service test ensure that the Display the 'Skip if empty' column in XML tree viewer check box is selected. This option displays a Skip if empty column in the tree view of the request. You can then choose the XML elements to skip.

Procedure

  1. Open the test in the test editor, and select the first element in the test.
  2. Click Add and select a service request.
  3. If you selected WSDL service request, select one or several WSDL files in your workspace for the web service that you want to test and click Next. If necessary, you can import a WSDL file into the workspace with the Add button.
  4. Select either HTTP, JMS, or WebSphere MQ depending on the transport protocol used by the web service, and provide the correct transport protocol configuration to perform the call. You can create a New transport configuration or reuse an existing one.
  5. Click Finish. This creates the web service request in the test editor.
  6. On the Message page of the request, select the Form, Tree, or Source views to edit the service request contents.
  7. If any resource files are to be attached to the request, select the Attachment tab. Use Add, Remove, or Edit to specify the resources that are to be attached to the request.
  8. If the service uses encryption, signature or other security protocols, select the Security for Request and Security for Response pages to configure the security for this particular service request or to open the WSDL security editor.

What to do next

After creating elements, you can use the test editor to edit service requests. You can create a service response element to test the performance and behavior of the service. You can also replace some content values with datapool variables or a references.

Feedback