You can use the Web Services Explorer in Eclipse to see the Web service in action.
- In the list of available services, click
BookLegacy .
This displays the WSDL in XML format.
- Copy the URL
http://localhost:8080/DynWebTest1/services/BookLegacy?wsdl from the field at the top of the browser.
- Click
.
This opens the Web Services Explorer view.
- 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.
- Click
WSDL Main.
This displays
Open WSDL in the
Actions pane of the Web Service Explorer.
- 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.
- In the
Name column, click
readBook.
This displays
Invoke a WSDL Operation in the
Actions pane.
- In the
stockNo field, type
1111, and then click
Go.
- The results are displayed in the
Status pane of the Web Service Explorer.
- 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.
- 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
|
- The book details should be returned in the Status pane.
- 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.