Develop Web services deployment descriptor templates for a Java bean implementation
Overview
Develop a WSDL file.
Overview
Completing this task creates the deployment descriptors used to describe how to map the service implementation to a JavaBean.
To develop the deployment descriptor templates from a Web Services Description Language (WSDL) file, 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 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 is a Java bean in a Web 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 WEB-INF subdirectory.
To develop deployment descriptor templates:
- Run the WSDL2Java -verbose -role develop-server -container web -genJava no wsdlURL command to generate the server deployment descriptor templates and mapping file into the WEB-INF subdirectory. If the -verbose option is specified, a list of all generated files displays when the command runs.
Results
Deployment descriptor templates that are required to implement or use a Web service.
Example
The following example uses a WSDL file named AddressBookJ2WB.wsdl:
- Generate the template files:
The deployment descriptor templates and mapping file are generated into the WEB-INF subdirectory as follows:
- WSDL2Java -verbose -role develop-server -container web -genJava no AddressBookJ2WB.wsdl
Parsing XML file: AddressBookJ2WB.wsdl Generating: WEB-INF\webservices.xml Generating: WEB-INF\ibm-webservices-bnd.xmi Generating: WEB-INF\ibm-webservices-ext.xmi Generating: WEB-INF\AddressBookJ2WB_mapping.xml
What to do next
Configure Web services deployment descriptors.
Configuring Web services deployment descriptors
Configuring the webservices.xml deployment descriptor
Configuring the ibm-webservices-bnd.xmi deployment descriptor
Developing a new Web service with an existing WSDL file using a Java bean
Developing a Web service from a Java bean
WSDL2Java command