Sending service requests with WSDL files

You can send requests to services based on SOAP, Java Messaging Service (JMS), WebSphere® MQ, and Microsoft .NET that use a Web Service Description Language (WSDL) file to specify the contents of the service request.

Before you begin

Ensure that you have a valid WSDL file, which is accessible either on the file system, in the workspace, at a specific URL, or in an IBM® WebSphere® Service Registry and Repository or a Universal Description Discovery and Integration (UDDI) repository.

Ensure that the WSDL files use the correct syntax for the test environment. The generic service client might not work with some WSDL files.

If the service uses Secure Sockets Layer (SSL) authentication, create an SSL configuration before sending the request. For more information, see Creating SSL configurations.

If the service uses SOAP security for encryption, signature, or other security algorithms, you must first configure the environment with the correct libraries and configuration files, and then create a WSDL security profile. For more information, see Creating security profiles for WSDL files.

To import a WSDL file from a secured site that requires mutual authentication, you must have the Keystore file in the workspace.

About this task

When you create a call from a WSDL file, the call is configured automatically with any SOAP, JMS, WebSphere® MQ, or Microsoft .NET endpoints that are available in the WSDL file. Select the corresponding transport configuration on the Transport page of the request.
Note: For the specific requirements related to Microsoft .NET support, see Creating Microsoft .NET transport configurations.

Procedure

To send a service request based on a WSDL file:
  1. Click the Open the Generic Service Client toolbar button Open the Generic Service Client button and select the Requests page.
  2. Click Add Add button and select the method to add a WSDL file or click the corresponding shortcut button on the main page.
    • Click Add WSDL from Workspace to add a WSDL file from the local workspace.
    • Click Add WSDL from File System to add a WSDL file from the file system.
    • Click Add WSDL from URL to download and import an online WSDL from the web.
    • Click Add WSDL from WSRR to add a WSDL from WebSphere® Service Registry and Repository. Enter the URL of the WebSphere® Service Registry and Repository and click Connect. You can click Search Search to browse the contents of the repository.
    • Click Add WSDL from UDDI to add a WSDL from a Universal Description Discovery and Integration (UDDI) repository. Enter the URL of the UDDI and click Connect. You can click Filter Filter and Search Search to browse the contents of the repository.
    Note: If you are importing the WSDL file from a secured site that requires certificate authentication, click Import Properties and, for Keystore, select the keystore file that contains the certificate to be provided to the server, and for the Keystore password, type the password.
  3. Click OK.
    The WSDL file is added to the Request Library.
  4. In the Request Library, expand the WSDL file, binding, and operation, and then select the call element.
    The generic service client shows three steps: Edit Data, Invoke and View Response. The details for the call are displayed under the Edit Data step.
  5. On the Message page, use the Form, Tree, or Source views to edit the contents of the request.
    Each view shows a different format of the same data. To add or remove XML elements in the Form or Tree view, click Schema > Validate and Assist to comply with an XML Schema Definition (XSD) specified in the schema catalog.
  6. On the Transport page, specify the transport configuration for the request.
    The transport information from the WSDL file is imported automatically into the transport configuration.

    For Microsoft .NET, select the corresponding transport configuration and specify the location of the soaclient.exe.config file. You must create this file manually. For details, see Creating Microsoft .NET transport configurations.

    Note: If you are using IBM® Security AppScan®, only the HTTP and .Net transport protocols are available.
  7. On the Request Stack page, specify whether to override the security or processing algorithms that are applied to the outgoing request for the WSDL file.
    Click Show Response Stack to add a Response Stack page to edit the security or processing algorithms for incoming responses.
    Note: These settings apply only to the current request. If you want to edit the request or response stack for all requests that use the current WSDL file, click Edit WSDL Security to open the WSDL Security Editor.
  8. When you are ready to send the service request, click Invoke.
    The generic service client sends the request and displays the message return under the View Response step.

What to do next

Successful requests are recorded and added to the Request History list. If you are using HCL OneTest Performance , you can create a service test by clicking the Generate Test Suite button (Generate Test Suite).