To add annotations to a method:
-
In the Package Explorer, expand the package, Java file, and class where the method is located.
-
Select the method.
-
Select from the menu bar.
- If you selected the Generate default annotations ... option in JAX-WS Preferences, the @Webmethod, @ResponseWrapper, and @RequestWrapper annotations are added to the code with default values
- If you selected Use wizards to overwrite defaults in JAX-WS Preferences, the Create Web Method wizard displays. The wizard enables you to edit the default values for the the @Webmethod, @ResponseWrapper, and @RequestWrapper annotations, and to add a @WebResult annotation if you wish. Step through in the wizard and click Finish.