Deploying web services and RuleApps by using Ant

You can use Ant commands to create or deploy web service applications and RuleApps.

Before you begin

Make sure that the server is started. If the server is not started, run the .bat file in the bin directory of your application server to start it.

About this task

After you generate a web service project, you use the build.xml file from this project to deploy the web service application to the server and the RuleApps to Rule Execution Server.

Procedure

  1. Use the Ant commands in the build.xml file as follows:
    • On WebSphere® Application Server:
      1. Run the ant create-ear command to create the EAR file that contains the web service.

        By default, the EAR file is generated in the web service project under /build/ear/.

      2. Deploy the EAR file manually to WebSphere Application Server: open the administrative console and enter the path to the generated EAR file.
    • On Tomcat:
      • Run the ant deploy.war command to deploy the WAR file directly. This Ant command compiles the application and makes it available on the reference implementation of the Java™ API for XML Web Services (JAX-WS RI).
      • Run the ant undeploy.war command to remove the application from the server.
    • On JBoss:
      • Run the ant deploy.ear command to deploy the EAR file directly. This Ant command compiles the application and makes it available on JAX-WS RI.
      • Run the ant undeploy.ear command to remove the application from the server.
  2. Optional: Deploy or undeploy your RuleApp on Rule Execution Server.
    • To deploy the RuleApp, run the ant deploy.ruleapp command, and then refresh the project in Eclipse to view the latest version of the RuleApp.
    • To clean up the resources, run the ant undeploy.ruleapp.