Creating a JAX-WS Web Service from a Java Class

See Also 

  1. Open a Java class.
  2. Type @WebService above the class declaration.
  3. Press Alt-Enter in the line, or click the lightbulb in the left sidebar, and select javax.jws.WebService.
  4. Press Alt-Enter in the class declaration, or click the lightbulb in the left sidebar, and click Add new operation.

    The Add Operation dialog box appears.

  5. Add an operation and click OK to exit the Add Operation dialog box.
  6. In the Projects window, expand the Web Services node and click on the new node, named after your Java class. For example, if your Java class is called Test.java, the new node in the Web Services node is called TestService. The web service opens in the Web Service Designer, where you can continue finetuning your web service, visually.
See Also
About Web Services
About Implementing Web Services
Creating a Web Service from a WSDL File
Creating a WSDL File

Legal Notices