subObj.setObjectName(serializedName.value());
}
serializeResponseObjXML(sb, subObj);
} else if (value instanceof IdentityProxy) {
// Only exception reponses carry a list of IdentityProxy objects.
IdentityProxy idProxy = (IdentityProxy)value;
String id = (idProxy.getValue() != null ? String.valueOf(idProxy.getValue()) : "");
if(!id.isEmpty()) {
IdentityDao identityDao = new IdentityDaoImpl();
id = identityDao.getIdentityUuid(idProxy.getTableName(), id);
}
if(id != null && !id.isEmpty()) {
// If this is the first IdentityProxy field encountered, put in a uuidList tag.
if (!usedUuidList) {
sb.append("<" + serializedName.value() + ">");
usedUuidList = true;
}
sb.append("<" + "uuid" + ">" + id + "</" + "uuid" + ">");
}
// Append the new idFieldName property also.
String idFieldName = idProxy.getidFieldName();
if (idFieldName != null) {
sb.append("<" + "uuidProperty" + ">" + idFieldName + "</" + "uuidProperty" + ">");
}
}
}
if (usedUuidList) {
// close the uuidList.
sb.append("</" + serializedName.value() + ">");
}
} else if (fieldValue instanceof Date) {
sb.append("<" + serializedName.value() + ">" + BaseCmd.getDateString((Date) fieldValue) + "</" + serializedName.value() + ">");
} else if (fieldValue instanceof IdentityProxy) {
IdentityProxy idProxy = (IdentityProxy)fieldValue;
String id = (idProxy.getValue() != null ? String.valueOf(idProxy.getValue()) : "");
if(!id.isEmpty()) {
IdentityDao identityDao = new IdentityDaoImpl();
if(idProxy.getTableName() != null) {
id = identityDao.getIdentityUuid(idProxy.getTableName(), id);
} else {
s_logger.warn("IdentityProxy sanity check issue, invalid IdentityProxy table name found in class: " + obj.getClass().getName());
}
}
if(id != null && !id.isEmpty())