Use the Web Service Explorer

You can use the Web Services Explorer in Eclipse to see the Web service in action.

  1. In the list of available services, click BookLegacy .

    This displays the WSDL in XML format.

  2. Copy the URL http://localhost:8080/DynWebTest1/services/BookLegacy?wsdl from the field at the top of the browser.
  3. Click Run > Launch the Web Services Explorer.

    This opens the Web Services Explorer view.

  4. In the top right of the Web Service Explorer page, click WSDL Page icon .

    This displays WSDL Main in the Navigator pane of the Web Service Explorer.

  5. Click WSDL Main.

    This displays Open WSDL in the Actions pane of the Web Service Explorer.

  6. Paste the copied URL into the WSDL URL field, and then click Go.

    This displays the WSDL Binding Details, which includes a list of all the operations and endpoints.

  7. In the Name column, click readBook.

    This displays Invoke a WSDL Operation in the Actions pane.

  8. In the stockNo field, type 1111, and then click Go.
  9. The results are displayed in the Status pane of the Web Service Explorer.
  10. Clicking on addBook brings up a form to enter the details for a new book. You can see how the Explorer has used the WSDL to generate a form for this operation.
  11. Enter the details of this book and click Go.
    Title: The Hobbit
    Type: Fiction
    Author: J. R. R. Tolkien
    StockNo: 7777
    ISBN: 0007487282
    Retail: 9.99
    Onhand: 10
    Sold: 20
  12. The book details should be returned in the Status pane.
  13. Try the other operations in the Navigator pane.
Note: In the Status pane there is a Source link to view the SOAP Request and Response Envelopes. The XML displayed which is sent via HTTP POST and received back from the server.