Documentation for Crowd 1.1. Documentation for other versions of Crowd is available too.

Generating client stubs with Axis can be accomplished by running this command:

java -cp "$AXISCLASSPATH" org.apache.axis.wsdl.WSDL2Java http://localhost:8095/crowd/services/SecurityServer?wsdl

When the necessary objects are created off the Crowd server WSDL, you will end up with a directory structure similar to this:

drwxr-xr-x   6 jstepka  jstepka  204 Apr 19 16:56 SecurityServer_pkg
drwxr-xr-x   3 jstepka  jstepka  102 Apr 19 16:55 com
drwxr-xr-x   4 jstepka  jstepka  136 Apr 19 17:05 java

When you attempt to compile the generated class files, you will end up with a compilation error similar to the following:

java/rmi/RemoteException.java:[10,7] cyclic inheritance involving java.rmi.RemoteException

java/rmi/RemoteException.java:[11,32] modifier private not allowed here

java/rmi/RemoteException.java:[12,29] modifier private not allowed here

java/rmi/RemoteException.java:[64,29] modifier private not allowed here

java/rmi/RemoteException.java:[86,20] modifier private not allowed here

java/rmi/RemoteException.java:[104,56] modifier private static not allowed here

com/atlassian/crowd/integration/exception/InvalidCredentialException.java:[26,30] incompatible types

To resolve these compile errors you will need to delete the generated java package.

The security server can then be used as below:

// connect to the crowd server, using the supplied service URL, similar to http://localhost:8095/crowd/services/SecurityServer?wsdl
SecurityServerLocator secServer = new SecurityServerLocator();
secServer.setSecurityServerHttpPortEndpointAddress(serviceURL);

// obtain a reference to the SOAP service, which axis manages.
SecurityServerHttpBindingStub stub = (SecurityServerHttpBindingStub) secServer.getSecurityServerHttpPort();

// authenticate the integrated crowd application
savedAppToken = stub.authenticateApplication(new ApplicationAuthenticationContext(
        new PasswordCredential(appPassword),
        appName,
        new ValidationFactor[0]));

// do your custom calls here
...