Testing an IBM i Web service

Before you begin

You must have a valid Web service test client file or a valid WSDL file to launch your Web service for testing purposes.

About this task

If you are using a Rational® Developer for Power Systems Software server for your Web service and you have a valid Web service test client file, you can test the Web service locally using the Rational test environment.

To use the Rational test environment with a valid Web service test client, do the following:
  1. Display the Servers view by selection Window > Show View > Servers.
  2. Add the project containing the Web service to the server by right-clicking the server and selecting Add and remove projects.
  3. Select the project in the left pane and click Add to add it to the server.
  4. Click Finish.
  5. Right-click the server and select Start.
  6. Right-click the Web service test client file you want to run and select Run > Run on server.

When you create a Web service, you can find the files generated for the Web service in the project folder and the Web Services folder.

To invoke the Web service from a WSDL file, do the following:

  1. Right-click the WSDL file for your Web service in the Web project and select Web Services > Test with Web Services Explorer. The Web Services Explorer is displayed in the browser window.
  2. Click the operation for your Web service in the Operations table. The Invoke a WSDL Operation page is displayed.
  3. Specify the input data for your Web service and click Go. The result of the operation is displayed in the Status window.
    Note: When testing a Web Service using the Web Services Explorer make sure to enter values for all parameters, otherwise there may be exceptions when invoking the Web Service operation. The exceptions are displayed in the WAS console.

Feedback