|Home > Documentation > Developing > Tutorials > Developing Web services > Developing JAX-RPC Web services|
This tutorial will take you through the steps required in developing, deploying and testing a Web Service in Apache Geronimo. After completing this tutorial you should be able to understand how to develop simple JAX-RPC compliant Web services in Apache Geronimo using Eclipse development environment. We also wont be focusing very much on developing client for JAX-RPC services as the client stubs generated are very close to that of JAX-WS.
To run this tutorial, as a minimum you will be required to have installed the following prerequisite software.
Details on installing eclipse are provided in the Development environment section. This tutorial will take you through the following steps:
This completes the configuration of Eclipse for application development.
This completes the development of Web services implementation code.
Expand WEB-INF directory and add the following code to
Now we need to create some additional files which will configure and describe the service.
webservices.xml: This completes the setting up of Deployment Descriptor and Deployment Plans.
Let us walk through the files that we created.
Converter.wsdl- Here we specify the web methods which are exposed and what are the request parameters and return parameters. We also specify other details like targetNamespace, service name, binding, port name, port type.
jaxrpcmapping.xml- Actually this file specifies the mapping between the java methods and WSDL messages. Here it is not required as we are mapping all the methods to WSDL. For Further reference here is a sample that how a method will be mapped from Java to WSDL.
webservices.xml- This is the file necessary for deploying any web services (JAX-RPC or JAX-WS). But starting from Java EE 5 webservices.xml is no longer necessary. This file contains all the necessary components to describe web service and where to find them.
Now, we will look into the steps involved in deploying and testing our web service without any clients.
The most important change that you need to do in your client is to use
javax.xml.rpc.Service instead of
The change you are required to do in the client JSP's are:
EJB JAX-RPC are very much similiar to POJO JAX-RPC we just implemented. Also the most important change between JAX-RPC and JAX-WS EJB Web service are the EJB anotations are not supported.
ejb-jar.xml, one has to specify which class are you using as Home, Remote, SEI, Bean. A sample ejb-jar.xml may look like this: This completes the development of JAX-RPC Web Services. After completing this tutorial you should have a understanding about how JAX-RPC Web Services are deployed.