Skip to main content
Omnitracs Knowledge Base

Apache Axis

To generate a J2SE or J2EE web service client we must first download Apache Axis from The latest version is 1.4 which became available on April 22, 2006.  Download the file to your local file system and unzip it to a directory of your choice.


Setup Environment Variables


The first thing you need to do is set your classpath for Apache Axis. To do this you need to change your "CLASSPATH" system environment variable. There are two ways to get there:

(1) Right click on My Computer and select Properties.
(2) Start, Settings, Control Panel, System.

Select the Advanced tab and click Environment Variables.


Look in the System variables section. If you don't have a CLASSPATH variable, click New. If you do have one already defined, click Edit. Add the following paths to the variable value:


... where %unzipdir% is the directory you originally unzipped Apache Axis too, then click OK.

You will need to remove the line breaks. There should be no spaces between the semicolons and the next character.


Generating Client


Open up a DOS-prompt to run the client generator tool. Change the directory to the location you want to place the generated java code. Then run the command replacing (WSDL-file-URL) with the URL of the WSDL file:

java org.apache.axis.wsdl.WSDL2Java (WSDL-file-URL)

For example, using the QTRACS Portal WSDL:

java org.apache.axis.wsdl.WSDL2Java

A folder containing four (or more) classes should be generated that correspond to the WSDL you just specified. A class that maps to the WSDL, a service class, a service locater class and a SOAP binding stub class were created using this command. You should also see data type and exception classes that were generated base on the WSDL definition.

Using the QTRACS Portal WSDL, the generated folder is named qtracswebws.

Note: Following the instructions above might return the following error:
Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. Receiving this error is not a bad thing. The generated client without the mail.jar, activation.jar and disabled attachment support will work just fine.

Web Service Classes:

Data Types:


(plus) Add Web Service Security Support

  • Was this article helpful?