Details
Description
If there are repeating groups or fields in a group, they will not be verified when received.
1. When verify the field in a fieldMap, fields in groups must be vevified.
DataDictionary.iterate(FieldMap map, String msgType) is the method to verify fields. It could be invoked in recursion.
Add this into DataDictionary:
// Check the fields and groups in groups.
if (isGroup(msgType, field.getField())) {
checkGroupCount(field, map, msgType);
List groupMembers = map.getGroups(field.getField());
Group originalGroup = (Group) groupMembers.get(0);
for (int i = 0; i < groupMembers.size(); i++)
{ originalGroup = (Group) groupMembers.get(i); GroupInfo rg = getGroup(msgType, field.getField()); DataDictionary group_dataDictionary = rg.getDataDictionary(); group_dataDictionary.hasVersion = this.hasVersion; group_dataDictionary.beginString = this.beginString; group_dataDictionary.fieldValues = this.fieldValues; group_dataDictionary.fieldTypes = this.fieldTypes; group_dataDictionary.iterate(originalGroup, msgType); }}
2. Groups must be added into memory from *.xml.
Add this into DataDictionary.addXMLGroup():
groupDD.addMsgField(msgtype, field);
Attachments
Issue Links
- duplicates
-
QFJ-168 Add repeating group validation in messages
- Closed