JBoss.orgCommunity Documentation

Chapter 7. Web Service Test View

7.1. Preliminaries
7.2. Testing a Web Service

JBoss Tools provides a view to test web services. The Web Services Test View can be displayed by following the steps in Web Services Test View.

Procedure 7.1. Web Services Test View

The following sections describe testing JAX-WS web services.

The following procedure describes the steps to perform before testing a web service.

Procedure 7.2. Testing a web service

A JAX-WS web service can be tested by using the Web Service Tester View displayed in Figure 7.1, “Web Service Test View”. The JAX-WS test is specified by:

  1. Selecting the JAX-WS combobox option.

  2. Entering the location of the WDSL file.

Step 2 can be performed in a number of ways including:

  • entering the location directly in the editable dropdown list; or

  • clicking the Get from WSDL file button and entering the URL, Eclipse workspace or File system details.

Testing a JAX-WS web service demonstrates testing the WebServiceSample project developed in Generate a sample web service.

Procedure 7.3. Testing a JAX-WS web service

  1. Following the preliminary steps described in Testing a web service, select JAX-WS from the available combo box options.

    Result:

    The SOAP message details are displayed in the Request Body textbox of the Request Details panel.

    Figure 7.3. JAX-WS Body Text


  2. Enter the location of the WSDL file in the editable dropdown list. The location for the WebServiceSample web service is http://localhost:8080/WebServiceSample/HelloWorld?WSDL

  3. Click the Invoke button.

    Result:

    The Select WDSL dialog appears.

    Figure 7.4. Select WSDL


  4. Select the required service attributes

    Select the Service, Port and Operation from the comboboxes and click OK.

    Results:

    The <soap:Body/> section of the SOAP message is filled with the SayHello message details.

    Figure 7.5. JBoss Tools Project Creation


    The response header details are returned.

    Figure 7.6. JBoss Tools Project Creation


    The response message body is displayed in the Response Body textbox.

    Figure 7.7. JBoss Tools Project Creation


    These results indicate a successful test.