## Creating Web services and clients using Apache CXF and Ant tasks

In addition to using the Web services wizards it is also possible to generate Ant files which you can use to create Web services and clients using the Apache CXF runtime environment. The Ant tasks can be run in the Eclipse workspace using Run As > Ant Build... or they can be run headless through the command line.

### Prerequisites:

1. Install and configure the Apache CXF runtime environment. See the Requirements and Installation page for more details.
2. Create a Dynamic Web Project for the Web Service or client and enable it for Apache CXF Web services development as described here: Create a project for CXF Web services.
3. Import the required Ant files into your workspace:
   1. Use the existing Dynamic Web Project created above or create a new project.
   2. Import the Ant files by selecting File > New > Other... > Web Services > Ant Files from the top level menu.
   3. Select the following:
      - Apache CXF as the Web service runtime.
      - The Web service or client type.
      - The folder into which the Ant files will be generated.

      Click Finish. The wizard will generate two files into the selected folder.

      1. An Ant file: One of `cxf_bujava.xml` (bottom-up), `cxf_tdjava.xml` (top-down) or `cxf_client.xml` (client).
      2. An Ant properties file which is referenced by the Ant file: One of `cxf_bujava.properties` (bottom-up), `cxf_tdjava.properties` (top-down) or `cxf_client.properties` (client)

Creating a Web service using Ant tasks in the Workbench
Creating a Web service client using Ant tasks in the Workbench
Using the Ant Tasks at the Command Line