Developing JAX-RPC web services
You can use the Java™ API for XML-based RPC (JAX-RPC) programming model to develop web services.
Before you begin
IBM® WebSphere® Application Server supports the Java API for XML-Based Web Services (JAX-WS) programming model and the Java API for XML-based RPC (JAX-RPC) programming model. JAX-WS is a web services programming model that extends the foundation provided by the JAX-RPC programming model. The JAX-WS programming model simplifies development of web services and clients through support of a standards-based annotations model. Although the JAX-RPC programming model and applications are still supported, take advantage of the easy-to-implement JAX-WS programming model to develop new web services applications and clients.
About this task
To develop web services based on the JAX-RPC programming model, 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 Web Services Description Language (WSDL) file. This task describes the steps when using the bottom-up development approach.
When developing a JAX-RPC web service starting from existing JavaBeans or enterprise beans, you need develop a WSDL file. You can use existing JavaBeans or enterprise beans 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 onto the application server.
- Considerations when using JavaBeans
JavaBeans exposed as JAX-RPC 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-RPC web services must be packaged in EJB 2.1 or in EJB 3.0 or higher modules.
- For JAX-RPC web services using EJB 2.1 style endpoints, the Web service method parameters must be one of the supported JAX-RPC types. These requirements are documented in the JAX-RPC specification.
- JAX-RPC web services using enterprise beans are supported over an HTTP or Java Message Service (JMS) transport.
It is a best practice to use EJB 2.1 style enterprise beans with JAX-RPC applications.
Procedure
Results
You have developed a JAX-RPC web service application.
What to do next
After you deploy the EAR file, test the web service to make sure that the service works with the application server.