Assembling a Web services-enabled WAR file from a WSDL file
We can assemble a WAR file from a Web Services Description Language (WSDL) file that is enabled for Web services.
We can assemble Java -based Web services modules with assembly tools provided with WAS. For JAX-WS Web service applications, we need the portable artifacts that are generated by the wsimport command-line tool when starting from a WSDL file to complete this task. The wsimport tool processes a WSDL file as input and generates the following portable artifacts:
- Service Endpoint Interface (SEI)
- Service class
- Exception classes that are mapped from the wsdl:fault class (if any)
- JAXB generated type values which are Java classes mapped from XML schema types
We can package the generated artifacts in a WAR file with the WSDL file and schema documents along with the endpoint implementation that you plan to deploy. For JAX-RPC Web service applications, we need the following artifacts that are generated by the WSDL2Java command-line tool to complete this task:
- An assembled WAR file that contains the EJB implementation, all the classes that generate from the WSDL2Java command-line tool and the web.xml deployment descriptor file.
- A WSDL file
- The complete webservices.xml, ibm-webservices-bnd.xmi, and ibm-webservices-ext.xmi deployment descriptors, and the JAX-RPC mapping file.
Assemble a Web services-enabled WAR file from a WSDL file by following the actions in the steps for this task section.
- Start an assembly tool. Read about starting the assembly tool in the Rational Application Developer documentation.
- If we have not done so already, configure the assembly tool so that it works on Java EE modules. we need to make sure that the Java EE and Web categories are enabled. Read about configuring the assembly tool in the Rational Application Developer documentation.
- Import the Java Beans implementation and the artifacts generated by the command-line tooling into the assembly tool.
- Migrate JAR files created with the Assembly Toolkit, Application Assembly Tool or a different tool to the Rational Application Developer assembly tool. To migrate files, import the JAR files to the assembly tool. Read about migrating code artifacts to an assembly tool in the Rational Application Developer documentation.
Results
The artifacts required to enable the Web module for Web services is added to the WAR file.
Next steps
Now we can assemble the WAR file that is enabled for Web services into an EAR file.
Related tasks
Assembling a Web services-enabled WAR into an EAR file
Assembling a WAR file that is enabled for Web services from Java code
Related
WSDL2Java command for JAX-RPC applications