Develop JAX-RPC web services deployment descriptor templates for an enterprise bean implementation
We can develop deployment descriptor templates for an EJB implementation that is enabled for JAX-RPC web services.
You need to create a service endpoint interface and develop a WSDL file before we can develop the deployment descriptor templates because the service endpoint interface and the WSDL file are artifacts used to create the templates.
Complete this task creates deployment descriptor templates that describe how to map the service implementation to a EJB. This task is a required step in developing a web service from an enterprise bean.
To develop the deployment descriptor templates from a WSDL file, obtain the Uniform Resource Locator (URL) of the WSDL file to use.
(zos) If the WSDL file is a local file, the URL looks like this example: file:drive:\path\file_name.wsdl.
(iseries) If the WSDL file is a local file, the URL looks like this example: file:/path/file_name.wsdl.
We can also specify local files using the absolute or relative file system path.
When the web service implementation contains an enterprise bean in an EJB module, the webservices.xml, ibm-webservices-bnd.xmi and ibm-webservices-ext.xmi deployment descriptors, and the Java API for XML-based remote procedure call (JAX-RPC) mapping file are generated in the META-INF subdirectory.
Run the WSDL2Java -verbose -role develop-server -container ejb -genJava no wsdlURL command to generate the server deployment descriptor templates and mapping file into the META-INF subdirectory. If the -verbose option is specified, a list of all generated files displays when the command runs.
(zos) Supported configurations: The WSDL2Java command-line tool is not supported on the z/OS platform. This functionality is provided by the assembly provided with the z/OS version of the product. Read about the WSDL2Java command-line tool for Java API for XML-based Remote Procedure Call (JAX-RPC) applications to learn more about this tool.
Results
You have deployment descriptor templates required to implement a web service.
Example
The following example uses the AddressBookJ2WE.wsdl WSDL file:
- Generate the template files with the following command syntax:
WSDL2Java -verbose -role develop-server -container ejb -genJava no AddressBookJ2WE.wsdl
The deployment descriptor templates are generated into the META-INF subdirectory as follows:
Parsing XML file: AddressBookJ2WE.wsdl Generating: META-INF\webservices.xml Generating: META-INF\ibm-webservices-bnd.xmi Generating: META-INF\ibm-webservices-ext.xmi Generating: META-INF\AddressBookJ2WE_mapping.xml
What to do next
Continue to complete the steps necessary to develop a JAX-RPC web service from an enterprise bean. The next step is to complete the EJB implementation. When you complete the EJB implementation, you assemble an enterprise bean JAR file containing the enterprise bean and supporting classes created from a WSDL file. To learn more, see the completing the EJB implementation for JAX-RPC applications information.
Related concepts
Development and assembly tools
Related tasks
Implement web services applications with JAX-RPC Implement web services applications from existing WSDL files with JAX-RPC Develop a service endpoint interface from enterprise beans for JAX-RPC applications Develop a WSDL file for JAX-RPC applications Assembling web services applications
Complete the EJB implementation for JAX-RPC applications WSDL2Java command for JAX-RPC applications