Any any = orb.create_any();
idtok = new IdentityToken();
if (X500Name.class.isAssignableFrom(cls)) {
_logger.log(Level.FINE,"Constructing an X500 DN Identity Token");
X500Name name = (X500Name) cred;
name.encode(dos); // ASN.1 encoding
X501DistinguishedNameHelper.insert(any, dos.toByteArray());
/* IdentityToken with CDR encoded X501 name */
idtok.dn(codec.encode_value(any));
} else if (X509CertificateCredential.class.isAssignableFrom(cls)) {