Sometimes I want to write a program something just for the sake of doing it. So I decided to write a simple Java client for Vault. As you may already know, Vault communicates over HTTP using SOAP, which means you can write a client in just about any language and platform that you want.
The program itself is pretty basic. It's just a Java port of the VaultList SDK sample, which just lists all the files in the Vault.
- Download VaultListJava
- Create a "lib" subfolder
- Download Axis 1.4 (axis-bin-1_4.zip)
- Unzip the file.
- Copy the lib directory contents to the lib directory under VaultListJava
- Execute VaultListJava.jar
If you are a member of the Autodesk Developer Network, you should read Tutorial: Using Java to Access the Vault API, which is the definitive guide to writing Java clients for Vault. Although it was written for Vault 5, it's still valid for Vault 2010.
I tried using some of the newer Java tools for web services, but I was not able to get them to work properly with Vault. The problem was getting control of the security header, which needs to be copied from the SecurityService to all the other services. Axis 1.4 gave me the ability to do that, but I was not able to find a way with JAX-WS or Axis 2. Of course, my Java is very rusty, so maybe I just missed how to do it.