code: public static String decodeDN(Codec codec, byte[] encodedDN) throws SASException {
          String dn = null;
  
          try {
              Any any = codec.decode_value(encodedDN, X501DistinguishedNameHelper.type());
              byte[] asnX501DN = X501DistinguishedNameHelper.extract(any);
  
              X500Principal x500Principal = new X500Principal(asnX501DN);
              // To maintain compatibility with tWAS, the toString() method
              // "is intentionally used because this is the only method which decodes extended attributes"
              dn = x500Principal.toString();
          } catch (Exception e) {
              throw new SASException(1, e);
          }
          return dn;
      }
docs: Decode a distinguished name from an ASN.1 X501 encoded Distinguished Name
  
  @param codec The codec to do the decoding of the Any.
  @param encodedDN The codec encoded byte[] containing the ASN.1 X501 encoded Distinguished Name.
  @return the distinguished name.
  @throws SASException