builder.setSymmetricEncAlgorithm(WSConstants.TRIPLE_DES);
builder.setKeyIdentifierType(WSConstants.CUSTOM_KEY_IDENTIFIER);
builder.setCustomEKTokenValueType(SecurityTokenReference.SAML_ID_URI);
builder.setCustomEKTokenId(assertion.getId());
builder.prepare(doc, hokCrypto);
Vector parts = new Vector();
WSEncryptionPart encP = new WSEncryptionPart("testMethod", "uri:LogTestService2", "Element");
parts.add(encP);
Element refElement = builder.encryptForInternalRef(null, parts);
builder.addInternalRefElement(refElement);