bst.setEncodingType(MessageConstants.BASE64_ENCODING_NS);
if (cs != null) {
bst.setValue(cs.getEncoded());
}
JAXBElement<BinarySecurityTokenType> bstElem = new com.sun.xml.ws.security.secext10.ObjectFactory().createBinarySecurityToken(bst);
IdentityType identityElement = new IdentityType();
identityElement.getDnsOrSpnOrUpn().add(bstElem);
reader = readHeader(identityElement);
} catch (CertificateEncodingException ex) {
log.log(Level.SEVERE, com.sun.xml.wss.logging.LogStringsMessages.WSS_0818_ERROR_PUTTING_CERTIFICATE_EPRIDENTITY(), ex);