code: public static String getXSIType(Object obj) {
          Class<?> type = obj.getClass();
  
          for (int i = 0; i < clazzes.length; i++) {
              if (type == clazzes[i]) {
                  return xsdStrs[i];
              }
          }
  
          if (obj instanceof java.util.Calendar) {
              return "xsd:dateTime";
          }
  
          throw new RuntimeException("Unknown data type during serialization:" + type);
      }
docs: only for the basic data types as shown above