*/
public void testSigningEncryptionEmbedded() throws Exception {
SOAPEnvelope unsignedEnvelope = message.getSOAPEnvelope();
SOAPEnvelope envelope = null;
WSEncryptBody encrypt = new WSEncryptBody();
WSSignEnvelope sign = new WSSignEnvelope();
encrypt.setUserInfo("16c73ab6-b892-458f-abf5-2f875f74882e");
encrypt.setKeyIdentifierType(WSConstants.EMBEDDED_KEYNAME);
encrypt.setKey(key);
sign.setUserInfo("16c73ab6-b892-458f-abf5-2f875f74882e", "security");
log.info("Before Encryption....");
Document doc = unsignedEnvelope.getAsDocument();
Document signedDoc = sign.build(doc, crypto);
Document encryptedSignedDoc = encrypt.build(signedDoc, crypto);
/*
* convert the resulting document into a message first. The toSOAPMessage()
* mehtod performs the necessary c14n call to properly set up the signed
* document and convert it into a SOAP message. After that we extract it