+

Search Tips   |   Advanced Search

Assembling a WAR file that is enabled for Web services from Java code


We can assemble a WAR file that is enabled for Web services from Java code with an assembly tool.

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 wsgen command-line tool when starting from a service endpoint implementation to complete this task. The wsgen tool processes a compiled service endpoint implementation class as input and generates the following portable artifacts:

For JAX-RPC Web service applications, we need the following artifacts that are generated by the WSDL2Java command-line tool to complete this task:

Assemble a Web services-enabled WAR file from Java code by following the actions in the steps for this task section.

 

  1. Start an assembly tool. Read about starting the assembly tool in the Rational Application Developer documentation.

  2. 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.

  3. Import the Java Beansimplementation and the artifacts generated by the command-line tooling into the assembly tool.

  4. Migrate WAR files created with the Assembly Toolkit, Application Assembly Tool (AAT) or a different tool to the Rational Application Developer assembly tool. To migrate files, import the WAR 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 are added to the WAR file.

 

Next steps

Now we can assemble the WAR file that is enabled for Web services into an EAR file.


Assembly tools

 

Related tasks


Assembling a Web services-enabled WAR into an EAR file
Assembling a Web services-enabled WAR file from a WSDL file

 

Related


WSDL2Java command for JAX-RPC applications