+

Search Tips   |   Advanced Search


Create a service stub

You can use a WSDL (Web Service Description Language) specification file to generate a service stub that can simulate the behavior of the original service and uses the exact same interface.

Service stubs are stored in test projects. If workspace does not contain a test project, the test creation wizard creates one, enabling you to change its name.

To store a service stub in a specific project, verify that the project exists before you create the stub.

If you are using Secure Sockets Layer (SSL) authentication, ensure that you have any required key files in workspace.

The wizard can import WSDL files from the workspace, the file system, a remote repository, or from a URL. Verify WSDL files use the correct syntax for the test environment. Service stub generation might not work with some Web Services Description Language (WSDL) files. To create a service stub from a WSDL file:

  1. In the workbench, click File > New > Other > Test > Test Assets > Service Test or click the New Service Stub

    toolbar button.

  2. Select the WSDL of the service to simulate. If necessary, you can import the WSDL from the file system, a URL, or a WSRR or UDDI repository.

  3. Click Next.

  4. Select a project location and a name for the new service stub. Click Finish.


Results

The wizard generates a working service stub that reproduces the interface of the original service as defined in the WSDL specification. Each operation is reproduced with a default response. You can edit the service stub with the stub editor to change the default response or to create conditional responses.


Related

  • Service stub overview


    Related tasks

  • Editing a service stub
  • Deploying service stubs
  • Add stub servers to a performance schedule