You use the Web Services Explorer in Eclipse to see the Web service in action.
- Click on the BookLegacy link in the list of services.
This will bring up the WSDL in XML format.
- Copy the URL
http://localhost:8080/DynWebTest1/services/BookLegacy?wsdl from the text box at the top of the view.
- Click
Run > Launch the Web Services Explorer. The Web Services Explorer view should appear.
- Click the
WSDL Page icon
. In the Navigator pane, an item called WSDL Main should appear.
- Click WSDL Main to show the Open WSDL pane.
- 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.
- Click on readBook. This brings up an Invoke a WSDL Operation page.
- Type
1111 into the
stockNo field and click
Go.
- The results are shown in the Status pane below the Actions pane.
- 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. Shown will be the XML which is sent via HTTP POST and received back from the server.