Step 2: Transform the Java class in a Web service
To transform the Java class created in Step 1: Write a new java class into a Web
Service, simply add a WebService
annotation:
@WebService(targetNamespace = http://www.mycompany.com/barcode ",
name="Barcode",
serviceName="BarcodeService")
public class BarcodeService{
...
}
This defines all public and non static methods of the class as operations of the BarcodeService Web Service.
In the next step we start the Web Service, Step 3: Start the service.