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 CXF 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:
To begin you need to modify the Ant properties file than was imported using the Ant Files wizard in the prerequisites.
- Edit the cxf_tdjava.properties if doing top-down development or the cxf_bujava.properties file for bottom-up development.
- Ensure the scenarioType parameter is set to service.
- Set the initialSelection parameter to the location of your WSDL file (top-down) or Java bean (bottom-up).
- All other parameters are optional and should be deleted if not explicitly set. The default values
for the remaining properties will be retrieved from the Dynamic Web project settings and preferences.
For additional information on how to set these parameters refer to:
Save the properties file.
- Select the cxf_tdjava.xml (top-down) or cxf_bujava.xml (bottom-up) and from the top level menu
and select Run > External Tools > External Tools Configurations.
- In the dialog that opens select Ant Build and then select the 'New launch configuration' button in the toolbar.
Select the JRE tab and select Run in the same JRE as the workspace.
Click Apply and then Run.
- A Build Successful message will be output to the console once the Web service has been generated.
Creating a Web service client using Ant tasks in the Workbench