Web Services for Java EE specification

The Web Services for Java™ Platform, Enterprise Edition (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 Java Specification Requirements (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 Java API for XML Web Services (JAX-WS) and Java API for XML-based RPC (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 Web Services Description Language (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.

You can integrate the Java EE technology with web services in a variety of ways. You 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. You can optionally use the webservices.xml deployment descriptor to specify the location of the WSDL file and override the value defined in the @WebServices annotation. For JAX-RPC applications, you must define the JAX-RPC mapping file. To learn more about the mapping that is defined between the WSDL file and your 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.

You 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 specification defines the webservices.xml deployment descriptor specifically for web services. The webservices.xml deployment descriptor file defines the set of web services that you can deploy in a Web Services for Java EE enabled container.

For JAX-WS web services, the use of the webservices.xml deployment descriptor is optional because you can use annotations to specify all of the information that is contained within the deployment descriptor file. You can use the deployment descriptor file to augment or override existing JAX-WS annotations. Any information that you define in the webservices.xml deployment descriptor overrides any corresponding information that is specified by annotations.

For example, if your service implementation class for your JAX-WS web service includes the @WebService annotation as follows:
@WebService(wsdlLocation=”http://myhost.com/location/of/the/wsdl/ExampleService.wsdl”)
and the webservices.xml specifies a different filename for the WSDL document as follows:
<webservices>
<webservice-description>
<webservice-description-name>ExampleService</webservice-description-name>
<wsdl-file>META-INF/wsdl/ExampleService.wsdl</wsdl-file>
…
</webservice-description>
</webservices>
then the value that is specified in the deployment descriptor, META-INF/wsdl/ExampleService.wsdl overrides the annotation value.

See section 5 of the Web Services for Java EE specification for details regarding the correlation between values specified in the web services deployment descriptor file and the attributes of the @WebService and the @WebServiceProvider annotations.

For JAX-RPC web services, you must define the deployment characteristics in the webservices.xml deployment descriptor file.

You are responsible for providing various elements to the deployment descriptor, including:
  • Port name
  • Port service implementation
  • Port service endpoint interface
  • Port WSDL definition
  • Port QName
  • MTOM/XOP support for JAX-WS web services
  • Protocol binding for JAX-WS web services
  • JAX-RPC mapping
  • Handlers (optional)
  • Servlet mapping (optional)
The Enterprise JavaBeans (EJB) 2.1 specification also states that for a web service developed from a session bean, the EJB deployment descriptor, ejb-jar.xml, must contain the service-endpoint element. The service-endpoint value must be the same as that stated in the webservices.xml deployment descriptor.

For a complete list of the supported standards and specifications, see the web services specifications and API documentation.