I am a newbie with a quick fix but trust me, I have searched all the forums thoroughly and haven't found the solution to this scenario. I am using quick fix 1.6 libs. I have a FIX message which has got a repeating group. When I send this message using sendToTarget() method, the message is forwarded to the FIX server without issues, but the fields get reordered due to which exchange rejects it. Reading through the posts, I got to know that using data dictionary will solve the problem. But when I use data dictionary with the same message I get "quick fix.InvalidMessage: Equal sign not found in field" exception. I know it's a valid message as per the data dictionary. Below are the message and code. Can someone please help. Thanks in advance.
FIX Message: 8=FIXT.1.1|9=00331|35=AE|49=AAA_FIX|56=BBB_FIX|34=29|52=20170124-09:47:14|1041=firm_trade_id_07|48=XS0102233434|22=4|25004=GBP|470=ZZ|32=100|31=6.33|15=GBP|64=20170125|60=20170124-09:47:14|1430=O|574=1|487=0|552=2|54=1|528=P|29=4|581=3|453=1|448=H7XNBB4851XX0REQ1F70|447=N|452=1|54=2|453=1|448=549300F2CCROIO4RRZ97|447=N|452=17|10=189|
Code:
BufferedReader reader = new BufferedReader(new FileReader ("Message.txt"));
String line = null;
StringBuilder stringBuilder = new StringBuilder();
String ls = System.getProperty("line.separator");
while((line = reader.readLine()) != null) {
stringBuilder.append(line);
stringBuilder.append(ls);
}
String messageString = stringBuilder.toString();
messageString = messageString.replace('|','\u0001');
Message FIXOrder = new Message(messageString, new DataDictionary("DD.xml"));
-Cheers MJ