sign.setKeyIdentifierType(WSConstants.UT_SIGNING);
sign.setSignatureAlgorithm(XMLSignature.ALGO_ID_MAC_HMAC_SHA1);
log.info("Before signing with UT text....");
sign.build(doc, null, secHeader);
log.info("Before adding UsernameToken PW Text....");
builder.prependToHeader(secHeader);
Document signedDoc = doc;
Message signedMsg = SOAPUtil.toAxisMessage(signedDoc);
if (log.isDebugEnabled()) {
log.debug("Message with UserNameToken PW Text:");
XMLUtils.PrettyElementToWriter(signedMsg.getSOAPEnvelope().getAsDOM(), new PrintWriter(System.out));