Network Deployment (Distributed operating systems), v8.0 > End-to-end paths > Web services


 Implementing web services applications from existing WSDL files with JAX-WS

When starting with an existing WSDL file, you can use a top-down approach to developing web services based on JAX-WS.

Best practice: IBM WAS supports the JAX-WS programming model and JAX-RPC. JAX-WS is the next generation web services programming model extending the foundation provided by JAX-RPC. Using the strategic JAX-WS programming model, development of web services and clients is simplified through support of a standards-based annotations model. Although JAX-RPC and applications are still supported, take advantage of the easy-to-implement JAX-WS programming model to develop new web services applications and clients. bprac

Locate the WSDL file that defines the web service to implement. We can develop a WSDL file or obtain one from an existing web service through email, downloading or a Uniform Resource Locator (URL). JAX-WS

To develop web services based on JAX-WS, you can use a bottom-up development approach starting from existing JavaBeans or enterprise beans or you can use a top-down development approach starting with an existing WSDL file. This task describes the steps when using the top-down development approach.

Considerations when using JavaBeans

  • JavaBeans exposed as JAX-WS web services are supported only over an HTTP transport.
  • JavaBeans may use Contexts and Dependency Injection (CDI). Note that constructor injection is not supported.

Considerations when using enterprise beans

  • The enterprise bean must be a stateless or singleton session bean.

  • Enterprise beans that are exposed as JAX-WS web services must be packaged in EJB 3.0 or higher modules.
  • JAX-WS web service applications containing enterprise beans must be deployed with the endptEnabler command.
  • JAX-WS web services using enterprise beans are supported over an HTTP or JMS transport.

  • Enterprise beans may use CDI. Note that constructor injection is not supported.


Procedure

  1. Set up a development environment for web services.

  2. Develop Java artifacts for JAX-WS applications using the wsimport command-line tool.

  3. (optional) Enable MTOM for JAX-WS web services.

  4. (optional) Enforce adherence to WSDL bindings in JAX-WS web services.

  5. (optional) Develop and configure a webservices.xml deployment descriptor for JAX-WS applications.

  6. Complete the implementation of your web service application.

  7. (Optional) Customize URL patterns in the web.xml file.

  8. Assemble the artifacts for your web service.

  9. Deploy the EAR file into the application server.

  10. Test the web service to make sure that the service works with the application server.


Results

You have created a JAX-WS web service by starting with an existing WSDL file.



Subtopics

Generate Java artifacts for JAX-WS applications from a WSDL file

Related concepts

JAX-WS

Related tasks

Set up a development environment for web services
Enable MTOM for JAX-WS web services
Enforcing adherence to WSDL bindings in JAX-WS web services
Develop a webservices.xml deployment descriptor for JAX-WS applications
Complete the JavaBeans implementation for JAX-WS applications
Complete the EJB implementation for JAX-WS applications
Customize URL patterns in the web.xml file for JAX-WS applications
Assembling web services applications
Deploy web services applications onto application servers
Test web services-enabled clients
Use HTTP to transport web services
Use SOAP over JMS to transport web services
Example: Installing a web services sample with the console
Implement web services applications with JAX-WS

Related reference

Artifacts used to develop web services
Web services specifications and APIs
Contexts and Dependency Injection (CDI)

Related information

Java API for XML Web Services (JAX-WS) API documentation
Java API for XML Web Services (JAX-WS) API User's Guide documentation









+

Search Tips   |   Advanced Search