code: private String getRealmName(WSCredential cred) {
          String realmName = null;
          if (cred != null) {
              try {
                  realmName = cred.getRealmName();
              } catch (Exception e) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Caught exception getting the realm name: " + e);
                  }
              }
          }
          return realmName;
      }
docs: Get the realm name from the specified credential.
  
  @param cred
  the WSCredential to search, must not be null
  @return realm name.