WSDL verification can be considered the first step in testing web services. Although WSDLs are generally created automatically by various tools, that doesn’t necessarily mean the WSDLs are correct. When WSDLs are manually altered, WSDL verification becomes even more important.

Correct and standards-compliant WSDLs enable your service consumers to function correctly and prevent vendor lock-in. This helps with interoperability and service reuse.

SOAtest can automatically generate a test suite of comprehensive WSDL tests to ensure that your WSDL conforms to the schema and passes XML validation tests. Additionally, it performs an interoperability check to verify that your web service will be interoperable with other WS-I compliant services.

When you complete this section of the tutorial, your test suite should resemble the test suite entitled "WSDL Tests" in the SOAtestTutorial.tst file.

Creating a WSDL Verification Test Suite

For this example, we will create WSDL tests for a bookstore service with the WSDL located at http://localhost:8080/parabank/services/store-01?wsdl.

To verify a WSDL using SOAtest’s WSDL Verification Tests:

  1. Create a new empty project and name it "Tutorial":
    1. Choose File > New > Project.
    2. Select General > Project.
    3. Click Next.
    4. Enter Tutorial under Project Name.
    5. Click Finish.
  2. Add a new .tst to that project:
    1. Right-click the new Tutorial project node, then choose Add New > Test (.tst) File.
    2. Enter Tutorial under File name, then click Next.
    3. Choose SOA > WSDL, then click Next.
    4. Type http://localhost:8080/parabank/services/store-01?wsdl as the WSDL URL.
    5. Disable Create Functional Tests from the WSDL and enable Create tests to validate and enforce policies on the WSDL.
    6. Click Finish. Because you enabled Create tests to validate and enforce policies on the WSDL, four WSDL tests are automatically created in a separate test suite called WSDL Tests. To see this test suite, open the Test Case Explorer tab and expand the tree.

      SOAtest automatically creates the following WSDL tests from a WSDL URL.
    • Test 1: Schema Validity: Runs XML validation on the WSDL against WSDL schemas from W3C.
    • Test 2: Semantic Validity: Checks the correctness of the WSDL by parsing and consuming it like an actual service consumer would, but with stricter adherence to standards.
    • Test 3: WS-I Interoperability: Checks WSDL conformance to the WS-I Basic Profile 2.0 (for SOAP 1.2), 1.2 (for SOAP 1.1) or 1.1 (also for SOAP 1.1).
    • Test 4: WSDL Regression: Creates a regression control for the WSDL so that changes in the WSDL document can be detected.
  3. Click the Test 3: WS-I Interoperability Check node and click the Add test or output... toolbar button.

    This opens the Add Output wizard, which shows a list of available tools. In addition, a description of the selected tool is shown in the Tool Description field.
  4. In the Add Output wizard, choose Conformance Report in the left pane and Browse in the right pane, then click Finish. This will send a WS-I Conformance report to your browser when you run the test.
  5. Select the Test Suite: WSDL Tests node and click the Run Tests toolbar button.

    If any errors occur, they will appear in the Console tab located at the bottom of the SOAtest GUI. For more information about an error, double-click its node.
  • No labels