Deploying and Accessing Apache Axis Web Services

Task Builders generate an Ant script, specific to the computer where Task Builder is installed, to automatically deploy an Axis Web service on the design-time computer. Follow the second procedure on this page to develop applications on a different computer.

To deploy an Apache Axis Web service to the same computer where the Web service was generated
  1. Start Apache Tomcat.

  2. Open the <AttachmateInstall>\EAI\recordings\<project_name>\webservice\AxisTarget directory and run deploy.cmd. This starts the Ant script.

  3. Re-start Apache Tomcat.
    Note If you are running Apache Tomcat on the design-time computer, you may need to run deploy.cmd again, after you re-start Apache Tomcat, in order to successfully deploy the Apache Axis Web service. This is necessary because the Ant script used by Services Builder must be run once to copy the service JAR file, and again to run the Apache configuration tool.

  4. Test your Web services deployment by typing the following into the address field of your browser:
    http://server_name:8080/axis/services/project_name?wsdl

To deploy an Apache Axis Web service to a different server than where Task Builder is installed
  1. Copy the entire AxisTarget folder to the desired server and customize the Ant script. Then run the script as described above.

    -or-

    Deploy the Web service manually. This process is documented in detail in the Axis User's Guide. To see an example of manually deploying an Axis Web service, see Manually Deploying Applications Using Apache Axis.

  2. Test your Web services deployment by typing the following into the address field of your browser:
    http://server_name:8080/axis/services/project_name?wsdl

Accessing an Apache Axis Web Service

Axis provides a method to generate Java client source code, WSDL2JAVA.

To access an Apache Axis Web service
  1. From a command line run:
    java -cp %classpath%; 
    C:\jakarta-tomcat-4.1.12\webapps\axis\WEB-INF\lib\axis.jar;
    C:\jakarta-tomcat-4.1.12\webapps\axis\WEB-INF\lib\log4jcore.jar;
    C:\jakarta-tomcat-4.1.12\webapps\axis\WEB-INF\lib\xerces.jar;
    C:\jakarta-tomcat-4.1.12\webapps\axis\WEB-INF\lib\jaxrpc.jar;
    C:\jakarta-tomcat-4.1.12\webapps\axis\WEB-INF\lib\saaj.jar;
    C:\jakarta-tomcat-4.1.12\webapps\axis\WEB-INF\lib\commons-logging.jar;
    C:\jakarta-tomcat-4.1.12\webapps\axis\WEB-INF\lib\commons-discovery.jar;
    C:\jakarta-tomcat-4.1.12\webapps\axis\WEB-INF\lib\wsdl4j.jar;
    C:\jakarta-tomcat-4.1.12\webapps\axis\WEB-INF\lib\tt-bytecode.jar;
    
    org.apache.axis.wsdl.WSDL2Java http://<MachineName>:<Tomcat_Port>/axis/services/<project_name>?wsdl

  2. The resulting Java files can be used to access the Axis Web service.
Related Topics
Bullet Using Tasks in Your Applications, Overview
Bullet Building Applications Using Apache Axis
Bullet Manually Deploying Applications Using Apache Axis
Bullet Apache Axis Sample Code
  Attachmate