O'Reilly logo

Java EE 7 Development with NetBeans 8 by David R. Heffelfinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a simple web service

In this section, we will develop a web service that performs a conversion of units of length. Our web service will have an operation that will convert inches to centimeters and another operation to do the opposite conversion (centimeters to inches).

In order to create a web service, we need to create a new web application project; in our example, the project name is UnitConversion. We can create the web service by right-clicking on our project, going to File | New File, then selecting the Web Services category, and finally selecting Web Service as our file type.

Creating a simple web service

After clicking on Next, we need to enter a name and package ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required