1. Install a Java Development Kit (JDK) if you have not already done so. The version you choose will need to be compatible with Apache Axis2, Apache Ant, your development environment, and your production environment. You can download the JDK as well as access install instructions for your operating system at Oracle's website. Once you have completed the installation, you can verify everything was successful by navigating to a command or terminal window and executing "javac -version". If the install was successful you should see an output that looks like "javac 1.x.x_xx" with the x's being replaced by the actual numbers identifying your JDK version.
  2. Install Apache Ant. You can find the download file as well as access install instructions for your operating system at ant.apache.org. To verify the setup, type "ant -version" in a terminal or command window. If everything was successful, the output should look similar to "Apache Ant(TM) version x.x.x compiled on Month DD YYYY". If you receive an error that the command was not recognized or not found, this would indicate that the Ant bin directory is not on your environment path. Add the correct directory to your path. Windows users will need close and reopen their command window; Unix users will need to reload the profile. Retry the previous command.
  3. Install Apache Axis2. You can find the download file as well as access install instructions for your operating system at axis.apache.org/axis2/java/core. Run the command "WSDL2Java" in a command or terminal window. If everything was successful, you should see an output describing usage of the command. If you receive an error that the command was not recognized or not found, ensure that the Axis2 bin directory is on your environment path and reload the command window or profile after making the change. If you see an error that says "The AXIS2_HOME environment variable is not defined correctly", create an environment variable for AXIS2_HOME and reload the command window or profile.
  4. In a command or terminal window, change directories to the location you would like the client code to be after it is created. Run the following command, making sure to replace the cluster number and the SITE name with your own. *Note: you may see some warnings about log4j properites. These can be ignored
    WSDL2Java -uri https://webservices.cluster[2 or 3].convio.net/1.0/SITE/wsdl -p com.convio.webservice.client -d adb -ss -g -uw -s

     
  5. Once you have successfully generated the client code, copy and paste the code below to verify a connection. *Note 1: This assumes you have already added your IP address to the web services whitelist. *Note 2: Different versions of Axis may generate client code slightly differently (i.e. login vs Login), so you may need to modify the code below to fit your specific setup.
    import com.convio.soap.*;
    import com.convio.webservice.client.*;
    
    public class LoginTest {
    
    	public static void main(String[] args) throws Exception {
    		ConvioServiceStub stub = new ConvioServiceStub();
    		LoginResult loginResult = stub.login("conviotesting23", "testing");
    
    		System.out
    				.println("You have successfully connected to LWS. Your session ID is: \n"
    						+ loginResult.getSessionId());
    
    	}
    
    }

* We provide the API Materials “as-is” and “with all faults”.  You bear the risk of using them. We give no express warranties, guarantees or conditions. We may change the Service or API Materials at any time and for any reason without notice. Some changes to the Service may cause Authorized Applications to stop working.

We provide this example as-is and give no express guarantees, warranties, or conditions.  We may change the service and API materials at any time and for any reason without notice.  Some changes may cause the code snippet to stop working.