Book Image

Java EE 7 Development with NetBeans 8

By : David R Heffelfinger
5 (1)
Book Image

Java EE 7 Development with NetBeans 8

5 (1)
By: David R Heffelfinger

Overview of this book

Table of Contents (18 chapters)
Java EE 7 Development with NetBeans 8
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Testing our RESTful web service


Once we deploy our project, we can make sure that the web service was deployed successfully by expanding the RESTful Web Services node on our project, right-clicking on our RESTful web service, and selecting Test Resource Uri:

This action will invoke the findAll() method in our service (since it is the only method that doesn't require a parameter), and the generated XML response will automatically be opened in the browser.

The XML response for our web service displays the data in the CUSTOMER table in the database in an XML format.

We can also easily test other methods in our web service by right-clicking on the project and selecting Test RESTful Web Services:

Now, the following popup window will show up:

In most cases, we should accept the default Web Test Client from the Project option, since it works with most browsers and operating systems.

Now, a page similar to the following will automatically open in the browser:

Expand any node from the left and click on...