Specify a User Through Configuration File

By default, as a PPM server the PPM Web service toolkit enables UsernameToken, Timestamp, and Encrypt.

Set Headers

In the client-axis2.xml file, the following "OutflowSecurity" section defines how WS-Security headers are set on an outgoing SOAP message generated by the toolkit.

<module ref="rampart" />
<parameter name="OutflowSecurity">
     <items>UsernameToken Encrypt Timestamp</items>

To specify a fixed user name for the web service call, simply change the value of the <user> element in the client-axis2.xml file.

Set Password

To set the password for this particular user, following these steps:

  1. Open <webservice_toolkit>/java/ client/src/examples/security/PasswordCallbackHandler.java

  2. Change the default password "admin" to the desired password.


public class PasswordCallbackHandler implements CallbackHandler
String username = null;
   public void handle(Callback[] callbacks) throws
           UnsupportedCallbackException {
     for (int i = 0; i < callbacks.length; i++) {
        WSPasswordCallback callback =
        // obtain password. This can be customized to obtain
        // password from any desire source and apply any
        // necessary algorithm.
        // if your logic requires the username, you can get
        // user name by:
        // String username = callback.getIdentifier();
        String password = "admin";
        // set the obtained password

Specify User

The following code describes how to specify the user through a configuration file.

String repositoryPath =
        String axis2 = repositoryPath + "/conf/clientaxis2.
        File file = new File(axis2);
        if (file.exists()) {
           try {
               ctx = ConfigurationContextFactory
                             repositoryPath, axis2);
             } catch (Exception e) {