JAX-WS annotations reference
You can use annotations with Web services to configure bindings and handler chains; and to set names of portType, service and other WSDL parameters. Annotations are used at build time to map Java™ to WSDL files and XML schema, and at run time to control how the JAX-WS runtime environment processes and responds to Web service invocations.
Purpose
You can apply annotations to these Java objects:
- Types such as a class, enum or interface
- Methods
- Fields that represent local instance variables in a class
- Parameters in a method
For more information about the annotations that are supported by JAX-WS, see the related references:
- Web Services Metadata Annotations (JSR 181)
Using annotations from the JSR 181 specification, you can annotate a Web service implementation class or a Web service interface. Then you can generate a Web service with a wizard or by publishing the application to a server.- JAX-WS 2.0 Annotations (JSR 224)
The JSR 224 specification defines annotations for JAX-WS 2.0.- JAX-WS Common Annotations (JSR 250)
The JSR 250 specification includes annotations for injecting a resource into an endpoint implementation class, and for managing application lifecycle.- Rules for methods in classes annotated with @WebService
When you use the @WebService annotation, several rules control how methods are exposed in your Web service and how you can use the @WebMethod annotation.
Related concepts
Using annotations to create Web services
Related tasks
Annotating a Java bean to create a Web service
Creating a Web service from a Java bean and a WSDL file
Annotating an EJB bean to create a Web service
Related information
JSR 175: A Metadata Facility for the Java Programming Language