Implement Web services applications from existing WSDL files with JAX-WS
We can develop a Web service with an existing WSDL file using the JAX-WS model.
IBM WAS supports JAX-WS and JAX-RPC. JAX-WS extends JAX-RPC and supports annotations.
We can develop a WSDL file or obtain one from an existing Web service through e-mail, downloading or a URL.
Java Beans exposed as JAX-WS Web services are supported only over an HTTP transport.
Considerations when using enterprise beans
- The enterprise bean must be a stateless 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.
Procedure
- Set up a development environment for Web services. You do not have to set up a development environment if we are using Rational Application Developer.
- Develop Java artifacts for JAX-WS applications using the wsimport command-line tool. The wsimport tool processes a WSDL file and generates portable Java artifacts that are used to create a Web service.
- (optional) Enable MTOM for JAX-WS Web services. Use SOAP Message Transmission Optimization Mechanism (MTOM) to optimize the transmission of binary attachments such as images or files along with Web services requests.
- (optional) Develop and configure a webservices.xml deployment descriptor for JAX-WS applications . We can optionally use the webservices.xml deployment descriptor to augment or override application metadata specified in annotations within the JAX-WS Web services.
- Complete the implementation of the Web service application.
- For Java Beans applications, complete the Java Beans implementation.
- For enterprise beans applications, complete the enterprise beans implementation.
- (Optional) Customize URL patterns in web.xml. When Java Beans are exposed as JAX-WS endpoints, optionally customize the URL patterns within the web.xml deployment descriptor contained in the WAR file.
- Assemble the artifacts for the Web service.
- Deploy the EAR file into the appserver. We can now deploy the EAR file that has been configured and enabled for Web services onto the appserver.
Results
we have created a JAX-WS Web service by starting with an existing WSDL file.
Next steps
After you deploy the EAR file, test the Web service to make sure that the service works with the appserver.
Generating 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
Develop a webservices.xml deployment descriptor for JAX-WS applications
Completing the Java Beans implementation for JAX-WS applications
Completing the EJB implementation for JAX-WS applications
Customizing URL patterns in web.xml for JAX-WS applications
Assemble Web services applications
Deploy Web services applications onto appservers
Use HTTP to transport Web services
Use SOAP over Java Message Service to transport Web services
Example: Installing a Web Services Sample with the console
Implement Web services applications with JAX-WS
Related
Artifacts used to develop Web services
Web services specifications and APIs 
Related information
JAX-WS API documentation
JAX-WS API User's Guide documentation