---
title: "Legacy SOAP API Setup"
canonical: "https://help.agiloft.com/space/HELP/43716450/Legacy+SOAP+API+Setup"
format: markdown
---
The SOAP-based Web Services API is enabled on a per-knowledgebase basis, and uses a token obtained at login to identify the session on subsequent calls.  

Table types extend a common `EWWSBaseUserObject` type. The generic methods use this common ancestor for their arguments and result types where relevant. When a generic method is invoked for a specific table, it accepts the table name as a string parameter and returns the corresponding specific descendant type as the result. The code in the client must perform the necessary typecasting, if required. The name of the table is not used, as it can be deduced from the invoked method. 

# Import the WSDL into your Development Environment

This section provides sample instructions for Apache Axis. For instructions about other development platforms, see your platform's product documentation.

The basic syntax for WSDL2Java is j`ava -classpath pathToJAR/fileName org.apache.axis.wsdl.WSDL2Java`

```powershell
 -a pathToWsdlDoc
```

The `-a` switch generates code for all elements, referenced or not, which may be necessary depending on your WSDL. 

If you have JAR files in more than one location, list them with a semicolon separating the files. For example, if the Axis JAR files are installed in C:\axis-1_3, and the WSDL is named MyKB.wsdl and is stored in C:\myKB:

```powershell
java -classpath c:\axis-1_3\lib\axis.jar;c:\axis-1_3\lib\axis-ant.jar;
c:\axis-1_3\lib\axis-schema.jar;c:\axis-1_3\lib\commons-discovery-0.2.jar;
c:\axis-1_3\lib\commons-logging-1.0.4.jar;?c:\axis-1_3\lib\jaxrpc.jar;
c:\axis-1_3\lib\log4j-1.2.8.jar;c:\axis-1_3\lib\saaj.jar;
c:\axis-1_3\lib\wsdl4j-1.5.2.jar; org.apache.axis.wsdl.WSDL2Java
-a C:\myKB\MyKB.wsdl
```

This command will generate a set of folders and Java source code files in the same directory in which it was run. After these files are compiled, they can be included in your Java programs for use in creating client applications.

For most Java development environments, you can use wizard-based tools for this process instead of the command line.

For more information about using WSDL2Java, see [https://ws.apache.org/axis/java/reference.html](http://ws.apache.org/axis/java/reference.html).

# Get Sample Code

To generate sample SOAP API code in Java or .NET:

1. Navigate to **Setup** **[Table]**.
2. Click the API tab.
3. Click either Download Java Sample or Download .NET Sample. The sample file contains a set of table-specific code samples for each of the API functions.

#### Related articles

> Macro (contentbylabel)