Use the Web Service Explorer

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

  1. Click on the BookLegacy link in the list of services.

    This will bring up the WSDL in XML format.

  2. Copy the URL http://localhost:8080/DynWebTest1/services/BookLegacy?wsdl from the text box at the top of the view.
  3. Click Run > Launch the Web Services Explorer. The Web Services Explorer view should appear.
  4. Click the WSDL Page icon . In the Navigator pane, an item called WSDL Main should appear.
  5. Click WSDL Main to show the Open WSDL pane.
  6. Paste the copied URL (or enter http://localhost:8080/DynWebTest1/services/BookLegacy?wsdl) into the text box and click Go.

    This brings up a WSDL Binding Details page, which includes a table listing all the operations.

  7. Click on readBook. This brings up an Invoke a WSDL Operation page.
  8. Type 1111 into the stockNo field and click Go.
  9. The results are shown in the Status pane below the Actions pane.
  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. Shown will be the XML which is sent via HTTP POST and received back from the server.