+

Search Tips   |   Advanced Search

Web Services for Java EE specification

The Web Services for Java EE specification defines the programming model and runtime architecture for implementing web services based on the Java language. Another name for the Web Services for Java EE specification is the JSR 109 The specification includes open standards for developing and implementing web services.

The Web Services for Java EE specification is based on the Java EE technology and supports the JAX-WS and JAX-RPC programming model for web services and clients in a manner that is interoperable and portable across application servers within environments that are scalable and secure. This specification is based on industry standards for web services, including WSDL and SOAP, and it describes the development and deployment of web services.

The application server supports the Web Services for Java EE specification, Version 1.3. This specification supports WSDL Version 1.1, SOAP Version 1.1 and SOAP Version 1.2.

We can integrate the Java EE technology with web services in a variety of ways. We can expose Java EE components as web services, for example, JavaBeans and enterprise beans. When you expose Java EE components as web services, clients that are written in Java code or existing web service clients that are not written in Java code can access these services. Java EE components can also act as web service clients.

The Web Services for Java EE specification is the preferred platform for Web-based programming because it provides open standards permitting different types of languages, operating systems and software to communicate seamlessly through the Internet.

For a Java application to act as web service client, a mapping between the WSDL file and the Java application must exist. For JAX-WS applications, the mapping is defined using annotations. We can optionally use webservices.xml to specify the location of the WSDL file and override the value defined in the @WebServices annotation. For JAX-RPC applications, define the JAX-RPC mapping file. To learn more about the mapping defined between the WSDL file and the web service application, see the JAX-WS specification or the JAX-RPC specification in the web services specifications and API documentation depending on the programming model used.

We can use a Java component to implement a Web service by specifying the component interface and binding information in the WSDL file, and designing the application server infrastructure to accept the service request.

This entire process encompassed is based on the Web Services for Java EE specification.

The webservices.xml file defines the set of web services we can deploy in a Web Services for Java EE enabled container.

For JAX-WS web services, using webservices.xml is optional. We can use annotations to specify all of the information contained within the deployment descriptor file. We can use the deployment descriptor file to augment or override existing JAX-WS annotations. Information defined in webservices.xml overrides any corresponding information specified by annotations.

For example, if the service implementation class for the JAX-WS web service includes the @WebService annotation:

...and the webservices.xml specifies a different filename for the WSDL document as follows:

...then the value specified in the deployment descriptor...