Operating Systems: i5/OS
             Personalize the table of contents and search results

 

Develop Web services applications from JavaBeans

 

Web services can be developed from existing JavaBeans. Set up a development environment for Web services.

 

Overview

You can develop a JAX-RPC Web service from JavaBeans. You can also develop a JAX-RPC Web service from an enterprise bean, develop a Web service with an existing Web Services Description Language (WSDL) file using JavaBeans, or develop a Web service with an existing WSDL file using an enterprise bean. In this task, you need develop a new WSDL file.

You can use a bean that already exists and then enable the implementation for Web services. Enabling the bean for Web services includes developing the service endpoint interface, developing a WSDL file that is the description of the Web service, generating and configuring the deployment descriptors, assembling all artifacts required for the Web service, and deploying the application into the WebSphere Application Server environment.

 

Procedure

  1. Set up a development environment for Web services. You do not have to set up a development environment if you are using Rational Application Developer.

  2. Access an existing JavaBeans WAR file.

  3. Develop a JavaBeans service endpoint interface. The service endpoint interface defines the methods for a particular Web service. The JavaBeans must implement methods having the same signature as the methods on the service endpoint interface.

  4. Develop a WSDL file. The WSDL file is the description of a J2EE Web service; without it there is no Web service.

  5. Develop Web services deployment descriptor templates for a JavaBeans implementation . You need to complete this step to create the deployment descriptor templates that are configured to map the service implementation to the JavaBeans implementation.

  6. Complete the JavaBeans implementation. When you complete the JavaBeans implementation, you are assembling a Java archive (JAR) file that contains a JavaBeans implementation and supported classes created from the WSDL file.

  7. Configure the webservices.xml deployment descriptor. Configure the webservices.xml deployment descriptor so that WebSphere Application Server can process the incoming Web services requests.

  8. Configure the ibm-webservices-bnd.xmi deployment descriptor. Configure the ibm-webservices-bnd.xml deployment descriptor so that WebSphere Application Server can process the incoming Web services requests.

  9. Assemble a WAR file that is enabled for Web services from Java code. You can assemble the artifacts that are required to enable the Web module for Web services into a WAR file.

  10. Assemble a WAR file that is enabled for Web services into an EAR file. You can assemble the artifacts that are required to enable the Web module for Web services into an EAR file.

  11. Deploy the EAR file into WebSphere Application Server. You can now deploy the EAR file that has been configured and enabled for Web services into the application server.

 

Results

You have a Web service developed from JavaBeans.

 

What to do next

After you deploy the EAR file, test the Web service to make sure that it works with the application server.


}
Setting up a development environment for Web services

Developing a service endpoint interface for JAX-RPC applications

Developing a WSDL file for JAX-RPC applications

Developing JAX-RPC Web services deployment descriptor templates for a JavaBeans implementation

Completing the JavaBeans implementation

Example: Developing and deploying a JAX-RPC Web service from an existing application

 

Related concepts


Web services

 

Related tasks


Using HTTP to transport Web services
Assembling Web services applications
Assembling a WAR file that is enabled for Web services from Java code
Assembling a Web services-enabled WAR into an EAR file
Deploying Web services applications onto application servers
Developing Web services applications from existing WSDL files with JavaBeans

 

Related Reference


Artifacts used to develop Web services
Web services specifications and APIs