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
- 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.
- Access an existing JavaBeans WAR file.
- 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.
- Develop a WSDL file. The WSDL file is the description
of a J2EE Web service; without it there
is no Web service.
- 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.
- 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.
- Configure the webservices.xml deployment descriptor.
Configure the webservices.xml deployment descriptor so that
WebSphere Application Server can process the incoming Web services requests.
- 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.
- 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.
- 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.
- 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
|