IBM® WebSphere JAX-WS runtime environment

Java™ API for XML-Based Web Services (JAX-WS) is the next generation web services programming model extending the foundation provided by the Java API for XML-based RPC (JAX-RPC) programming model. Using JAX-WS, development of web services and clients is simplified with greater platform independence for Java applications by the use of dynamic proxies and Java annotations.

Enabling the WebSphere JAX-WS runtime environment

Both the WebSphere® JAX-RPC and WebSphere JAX-WS runtime environments are supported by the tools. Web services using either runtime environment can coexist in the workspace, and can share EAR files and application modules (Web projects). JAX-RPC web service clients can even be used to access JAX-WS Web Services and vice versa if the web service does not use any JAX-WS specific options such as SOAP 1.2 or asynchrony. You can create top-down or bottom-up Java web services and clients. EJB web service generation using the JAX-WS runtime environment is only supported with WebSphere Application Server v7.0 and later, and WebSphere Application Server Liberty Profile V8.5.5.

In the Services view of the Java EE perspective, the JAX-RPC and JAX-WS web services will be listed under their respective headings:

Screen capture of the JAX-WS and JAX-RPC nodes shown in the Java EE Services view

The JAX-WS runtime is enabled by default in WebSphere Application Server V7.0 and later. When creating web projects, so long as you select the default configuration for your version of WebSphere Application Server the correct facets will be selected.

JAX-WS web service artifacts

A JAX-WS web service is contained within a Web archive (WAR) file or a WAR module within an enterprise archive (EAR) file. A JAX-WS enabled WAR file contains:
A WEB-INF/web.xml file.
The web.xml does not contain servlet or servlet-mapping elements. The WebSphere Application Server runtime defines them dynamically as the module is loaded.
Annotated classes that implement the web services, which are contained in the application module.
Annotated classes must contain, at a minimum, a web service implementation class that includes the @javax.jws.WebService annotation. The definition and specification of the web services-related annotations are provided by the JAX-WS and JSR-181 specifications. The web service implementation classes can exist within the WEB-INF/classes or directory within a Java archive (JAR) file that is contained in the WEB-INF/lib directory of the WAR file.
Web Services Description Language (WSDL) documents that describe the web services that are contained in the application module [optional].
You can optionally include WSDL documents in the JAX-WS application packaging. If the WSDL document for a particular web service is omitted, then the WebSphere Application Server runtime environment constructs the WSDL definition dynamically from the annotations contained in the web service implementation classes. You must include the @javax.jws.WebService, and optionally the @WebMethod, @WebParam, @WebResult, and @SOAPBinding annotations if the WSDL document is omitted.

Feedback