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. With the WAS Feature Pack for Web services installed 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 WAS v7.0.

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

The JAX-WS runtime is enabled by default in WAS v7. When creating dynamic Web projects, so long as you select the default configuration for WAS v7.0 the correct facets will be selected.

When deploying to WAS v6.1 with the Feature Pack for Web Services installed, a few additional steps are required to create or work with JAX-WS Web services:

 

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 WAS 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 WAS 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.

 

Related concepts

JAX-WS (JSR-224)

JAXB (JSR-222)

What's new in the Feature Pack for Web Services

 

Related tasks

Creating a JAX-WS enabled WebSphere server

Creating a JAX-WS enabled dynamic Web project

Creating a Web service from a Java bean using the IBM WebSphere JAX-WS runtime environment

Creating a Java bean skeleton from a WSDL document using the WebSphere JAX-WS runtime environment

Generating a Web service client from a WSDL document using the IBM WebSphere JAX-WS runtime environment

Creating an enterprise bean (EJB) skeleton from a WSDL document using the WebSphere JAX-WS runtime environment