Details
-
Type: Bug
-
Status: Closed
-
Priority: Default
-
Resolution: Fixed
-
Affects Version/s: 1.2.1
-
Fix Version/s: 1.3.1
-
Component/s: Metadata/Specs
-
Labels:None
-
Environment:winXP SP2, JDK1.5.0.12, Eclipse 3.3
Description
In QFJ_1.2.1, I can't use the repeating group "NoHops"and the fiels 628,629,630. I only can use field 627.
Because repeating group "NoHops" is the only group at messageHeader, so in many places, we may ignore it! For example, at DataDictionary.java,
private void load(InputStream inputStream) throws ConfigError {
.......
// HEADER
NodeList headerNode = documentElement.getElementsByTagName("header");
if (headerNode.getLength() == 0)
NodeList headerFieldNodes = headerNode.item(0).getChildNodes();
if (headerFieldNodes.getLength() == 0)
for (int i = 0; i < headerFieldNodes.getLength(); i++) {
Node headerFieldNode = headerFieldNodes.item;
String nodeName = headerFieldNode.getNodeName();
if (nodeName.equals("field") || nodeName.equals("group")) {
String name = getAttribute(headerFieldNode, "name");
if (name == null)
String required = getAttribute(headerFieldNode, "required", NO);
if (required == null)
addHeaderField(lookupXMLFieldNumber(document, name), required.equalsIgnoreCase("Y"));
}
........
}
It only load <group name="NoHops" required="N"> from fix44.xml, but can't load <field name="HopCompID" required="N"/>Unable to render embedded object: File ("<field name="HopSendingTime" required="N"/>) not found."<field name="HopRefID" required="N"/> which are in the group.
So, maybe, we should add:
if (nodeName.equals("group")) {
String required = getAttribute(headerFieldNode, "required");
if (required == null)
addHeaderXMLGroup(document, headerFieldNode, this, required
.equalsIgnoreCase("Y"));
}
}
there, I used a new function:addHeaderXMLGroup(),coming from addXMLGroup().
This question may relate to addXMLComponentFields(), addXMLGroup(), addGroup(), isGroup(), getGroup(), checkGroupCount(), iterate() at DataDictionary.java; and parseGroup(), parseHeader() at Message.java; where ignore the only group at messageHeader, "NoHops".