bst.setEncodingType(BASE64_NS);
bst.setToken("12345678".getBytes());
bst.setID("Id-" + bst.hashCode());
WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), bst.getElement());
WSSecTimestamp timestamp = new WSSecTimestamp();
timestamp.setTimeToLive(600);
timestamp.build(doc, secHeader);
WSSecSignature sign = new WSSecSignature();
sign.setUserInfo("16c73ab6-b892-458f-abf5-2f875f74882e", "security");
sign.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);
Vector parts = new Vector();
parts.add(new WSEncryptionPart(bst.getID()));
parts.add(new WSEncryptionPart(timestamp.getId()));
sign.setParts(parts);
Document signedDoc = sign.build(doc, crypto, secHeader);
Message msg = SOAPUtil.toAxisMessage(signedDoc);