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
Procedure
- Click the Open the Generic Service Client toolbar button and select the Requests page.
- Click Add 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 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 and 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. - Click OK.The WSDL file is added to the Request Library.
- 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.
- 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, clickto comply with an XML Schema Definition (XSD) specified in the schema catalog.
-
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. - 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.
- 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.