The Java API for XML Web Services (JAX-WS) is a Java -based application programming interface for creating web services that is part of the Java EE platform . JAX-WS is a replacement for JAX-RPC technology, providing a more document-oriented message model and simplifying the development of [1] web services through the use of annotations first introduced in Java SE 5. JAX-WS technology is a standard and is described in JSR 224.
Content
JAX-WS Benefits
- Using annotations eliminates the need to create web services descriptors. The endpoints are declared directly in Java classes .
- Direct integration with JAXB 2.0.
- Resource injection.
- support.
- Opportunity to choose between two development paths: bottom-up (the programmer develops endpoint-classes himself) and top-down (Java classes are generated by WSDL ).
Annotations
JAX-WS uses the annotations described in JSR 181 [2] to map the POJO classes to WSDL. Among them:
- @WebService - indicates that the Java class (or interface) is a web service.
- @WebMethod - allows you to configure how the class method is displayed on the operation of a web service.
- @WebParam - allows you to customize how the specific operation parameter will be displayed on the WSDL part (part) and the XML element.
- @WebResult - allows you to customize how the return value of the operation will be displayed on the WSDL-part (part) and XML element.
- @Oneway indicates that the operation is one-way, that is, it has no output parameters.
- @SOAPBinding - allows you to customize how the web service is displayed on the SOAP protocol.
Name change
Initially, the technology was supposed to be called JAX-RPC 2.0, however, due to the departure from RPC- style to greater document-orientedness, it was decided to change the name to JAX-WS 2.0.
Frames supporting JAX-WS
- GlassFish Metro (JAX-WS Reference Implementation, or JAX-WS Reference Implementation)
- Apache axis2
- Apache cxf
- JBossWS Native
Links
Notes
- SR JSR 224, Java API for XML Web Services 2.0 (eng.)
- β JSR 181, Web Services Metadata for the Java TM Platform [1]