/**
* Test that adds a UserNameToken with an empty password via WSHandler
*/
@org.junit.Test
public void testUsernameTokenWSHandlerEmptyPassword() throws Exception {
CustomHandler handler = new CustomHandler();
Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
RequestData reqData = new RequestData();
java.util.Map<String, Object> config = new java.util.TreeMap<String, Object>();
config.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
config.put(WSHandlerConstants.PW_CALLBACK_REF, this);
reqData.setUsername("emptyuser");
reqData.setMsgContext(config);
java.util.List<Integer> actions = new java.util.ArrayList<Integer>();
actions.add(Integer.valueOf(WSConstants.UT));
handler.send(WSConstants.UT, doc, reqData, actions, true);
if (LOG.isDebugEnabled()) {
LOG.debug("Username Token with an empty password via WSHandler");
String outputString =
org.apache.ws.security.util.XMLUtils.PrettyDocumentToString(doc);