WebSphere Application Server - Express, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Developing Web services deployment descriptor templates for an EJB implementation

This topic explains how to develop deployment descriptor templates for an Enterprise JavaBeans (EJB) implementation that is enabled for Web services.

Before you begin

You need to create a service endpoint interface and develop a Web Services Description Language (WSDL) file before you can develop the deployment descriptor templates because the service endpoint interface and the WSDL file are artifacts that are used to create the templates.

Why and when to perform this task

Completing this task creates deployment descriptor templates that describe how to map the service implementation to a Enterprise JavaBeans (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, you must obtain the Web address of the WSDL file to use.

If it is a local file and you are running the Windows platform, the URL looks like this: file:drive:\path\file_name.wsdl. If you are using the UNIX platform, the URL looks like this: file:/path/file_name.wsdl. You 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.

Develop deployment descriptor templates with the following step provided in this task section.

Step for this task

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.

Result

You have deployment descriptor templates that are required to implement a Web service.

Example

The following example uses the AddressBookJ2WE.wsdl WSDL file:
  1. 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 that are necessary to develop a 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 Java archive (JAR) file that contains the enterprise bean and supporting classes created from a WSDL file.



Related tasks
Assembling a Web services-enabled enterprise bean JAR file from a WSDL file
Configuring Web services deployment descriptors
Configuring the webservices.xml deployment descriptor
Configuring the ibm-webservices-bnd.xmi deployment descriptor
Developing new Web services from an existing WSDL file using an EJB implementation
Developing a Web service from an enterprise bean

Related reference
WSDL2Java command

Task topic    

Terms of Use | Feedback

Last updated: Jun 8, 2005 12:45:23 PM EDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/twbs_ejbdeploydescriptor.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)