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

Developing EJB implementation templates and bindings from a WSDL file

This task explains how to develop Enterprise JavaBeans (EJB) implementation deployment descriptor templates and binding from a Web Services Description Language (WSDL) file.

Before you begin

To develop EJB implementation templates and bindings from a WSDL file, you must obtain the Uniform Resource Locator (URL) of the WSDL file to use.

If it is a local file and you are running the Windows platform, the URL looks like the following example: file:drive:\path\file_name.wsdl. If you are using the Linux or UNIX platform, the URL looks like the following example: file:/path/file_name.wsdl. You can also specify local files using the absolute or relative file system path.

Why and when to perform this task

This task is one a required step in developing a Web service from an enterprise bean.

Implementation templates are generated using the -role develop-server option of the WSDL2Java command.

Templates are generated for an EJB implementation for the following components:
  • enterprise bean
  • EJB remote interface
  • EJB Home
The WSDL2Java command also generates bindings and deployment descriptors.
Develop implementation templates and bindings from a WSDL file:

Step for this task

Run the WSDL2Java -verbose -role develop-server -container ejb wsdlURL command. Because the verbose option is specified, a list of all the generated files is displayed when the command runs.

Result

You have templates for the implementation and deployment descriptors required to implement Web services, as well as bindings files. These templates are partially completed with information from the WSDL file.

Example

AddressBook.wsdlWSDL2Java -verbose -role develop-server -container EJB AddressBook.wsdl
Parsing XML file:  file:e:/example/app/topdown/step1/AddressBook.wsdl 
WSWS3185I: Info: Parsing XML file:  AddressBook.wsdl
WSWS3282I: Info: Generating addr\Address.java.
WSWS3282I: Info: Generating addr\Phone.java.
WSWS3282I: Info: Generating addr\StateType.java.
WSWS3282I: Info: Generating addr\AddressBook.java.
WSWS3282I: Info: Generating addr\AddressBookSoapBindingImpl.java.
WSWS3282I: Info: Generating addr\AddressBook_RI.java.
WSWS3282I: Info: Generating addr\AddressBookHome.java.
WSWS3282I: Info: Generating META-INF\webservices.xml.
WSWS3282I: Info: Generating META-INF\ibm-webservices-bnd.xmi.
WSWS3282I: Info: Generating META-INF\AddressBook_mapping.xml.
WSWS3282I: Info: Generating META-INF\ibm-webservices-ext.xmi.

What to do next

Complete the EJB implementation. When you complete the EJB implementation, an EJB Java archive (JAR) file that contains an EJB and supporting classes is created from a WSDL file.



Related tasks
Completing the EJB implementation
Developing new Web services from an existing WSDL file using an EJB implementation

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_devejbbindings.html

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