public static <T> void Model2Doc_childs(T t,Document reqData, Node parentNode) throws IllegalArgumentException, IllegalAccessException {
Class<?> clazz = t.getClass();
Field[] fields = clazz.getFields();
for (Field f : fields) {
System.out.println(f.getType());
if (f.getType().equals(String.class)||f.getType().equals(Integer.class)) {
Node n_node = reqData.createElement(f.getName());
// System.out.println(f.getName());
f.setAccessible(true);
String value=String.valueOf(f.get(t));
/*n_node.appendChild(reqData.createTextNode(XmlModelUtil
.getProperty(t, f.getName()).toString()));*/
n_node.appendChild(reqData.createTextNode(value));
parentNode.appendChild(n_node);
}
}
/* Field[] fields= t.getClass().getDeclaredFields();
for (Field f : fields) {
if(f.getType().equals(QryBatchStateInfoResponseModel.class)){
f.setAccessible(true);
QryBatchStateInfoResponseModel a=(QryBatchStateInfoResponseModel)f.get(t);
Field[] declaredFields = QryBatchStateInfoResponseModel.class.getDeclaredFields();
for (Field field : declaredFields) {
if (!field.getType().equals(List.class)) {
Node n_node = reqData.createElement(field.getName());
System.out.println(field.getName());
n_node.appendChild(reqData.createTextNode(XmlModelUtil.getProperty(a, field.getName()).toString()));
parentNode.appendChild(n_node);
}
}
}
}*/
}