docs: @SuppressWarnings({ "unchecked", "rawtypes" })
      public static void setRunAsSubject(final Subject subject)
                      throws WSSecurityException {
          SecurityManager sm = System.getSecurityManager();
          if (sm != null) {
              sm.checkPermission(SETRUNASSUBJECT_PERM);
          }
          try {
              java.security.AccessController.doPrivileged(new PrivilegedExceptionAction() {
                  @Override
                  public Object run() throws WSSecurityException {
                      SubjectManagerService sms = smServiceRef.getService();
                      if (sms != null) {
                          sms.setInvocationSubject(subject);
                      }
                      return null;
  
                  }
              });
  
          } catch (PrivilegedActionException pae) {
              WSSecurityException e = (WSSecurityException) pae.getException();
              throw e;
          }
      }