code: public HumanNameDataType getHumanNameDataType(KeyPersonDto keyPerson) {
  
          HumanNameDataType humanName = HumanNameDataType.Factory.newInstance();
          humanName.setFirstName(keyPerson.getFirstName());
          humanName.setLastName(keyPerson.getLastName());
          String middleName = keyPerson.getMiddleName();
          if (middleName != null && !middleName.equals("")) {
              humanName.setMiddleName(middleName);
          }
          return humanName;
      }
docs: Create HumanNameDataType from KeyPersonInfo object
  
  @param keyPerson KeyPersonInfo
  @return HumanNameDataType corresponding to the KeyPersonInfo object