Software AG Infrastructure 10.7 | Working with Web Services | Configuring Web Service Security | Configuring Client Authentication | Implementing Password Callback Handlers | com.softwareag.wsstack.client.pwcb.ConfigFileClientPasswordCallbackHandler
 
com.softwareag.wsstack.client.pwcb.ConfigFileClientPasswordCallbackHandler
The password callback handler retrieves identifier-password pairs from a configuration file and then loads the pairs which can be used to find the needed password for a particular identifier. The configuration file must be in XML format and similar to the axis2.xml file.
You can provide a configuration file to the callback handler by specifying it in the client side. In the axis2.xml file, you add a PWCBClientConfigFileLocation parameter, which is set to point to the configuration file resource on the client side.
<serviceGroup>
<service name="Sample_Web_Service">
<parameter name="PWCBClientConfigFileLocation"> configuration_file_location
</parameter> ...
</service>
</serviceGroup>
If you do not specify the configuration file resource, by default the callback handler searches for a resource with name users.xml in the client repository configuration path. If it is not available, a FileNotFoundException is thrown. Below is a sample configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<users>
<user username="myUser" password="myPass" />
</users>