# Creating a Web service using Ant tasks in the Workbench

You can use Ant through the Eclipse workspace to generate a Web service using the Axis run-time environment. Both top-down and bottom-up Web services development is supported with the Ant tasks.

Before creating the Web service you must:

- complete the prerequisites listed in: Creating Axis runtime environment Web services and clients using Web services Ant tasks
- if you are creating a top-down Web service, create or import a WSDL file into the `WebContent` folder of the dynamic Web project you created.
- If you are creating a bottom-up Web service, create or import a Java bean into the `src` folder of the dynamic Web project.

In order to create the Web service you need to modify the Ant file and the service Ant properties file.

1. Edit the Ant file (`axis_tdjava.xml` or `axis_bujava.xml`) that you imported in the prerequisite steps. Ensure that it points to the service Ant properties file: it should contain a line stating `<property file="axis_tdjava.properties"/>` or `<property file="axis_bujava.properties"/>`. Save any changes that you have made.
2. Edit the properties file that you imported in the prerequisite steps.
   1. Ensure that the scenarioType parameter is set to service.
   2. Set the workspace parameter so that it points to the location of your WSDL file or Java bean.
   3. All other parameters are optional and should be deleted if not explicitly set. The default values for the remaining parameters will be retrieved from the dynamic project settings and preferences. For additional information on how to set these parameters refer to:
      - Top-down Axis Web service Ant task properties file reference
      - Bottom-up Axis Web service Ant task properties file reference
   Save the properties file.
3. Right-click `axis_tdjava.xml` or `axis_bujava.xml` and select Run As > Ant Build...
4. In the dialog that opens, select the JRE tab and select Run in the same JRE as the workspace. Click Apply and then click Run.
5. Once your Web service has been generated the console displays a `Build Successful` message.

The WSDL file for the service will have been created and placed in the dynamic Web project's WebContent\wsdl folder. The following files will have been created and placed in a subdirectory of the dynamic Web project's WebContent\WEB-INF folder:

- web.xml
- undeploy.wsdd
- deploy.wsdd

If you are creating a top-down Web service, Web service files similar to the following ones will be created and placed under the dynamic Web project's src folder. Depending on the WSDL file on which the Web service is based, the files for your Web service may be different:

- Service_name_PortType.java
- Service_name_Service.java
- Service_name_ServiceLocator.java
- Service_nameSOAPImpl.java
- Service_nameSOAPSkeleton.java
- Service_nameSOAPStub.java

- Top-down Axis Web service Ant task properties file reference
  The axis_tdjava.properties file is used to pass data to the Web services Ant tasks when creating an Axis Web service . This file shows the available options.
- Bottom-up Axis Web service Ant task properties file reference
  The axis_bujava.properties file is used to pass data to the Web services Ant tasks when creating an Axis Web service . This file shows the available options.

Parent topic: Creating Axis runtime environment Web services and clients using Web services Ant tasks