<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p style='margin:0in;margin-bottom:.0001pt;line-height:13.5pt;background:white;vertical-align:baseline'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>Hi,<o:p></o:p></span></p><p style='margin:0in;margin-bottom:.0001pt;line-height:13.5pt;background:white;vertical-align:baseline'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'><o:p> </o:p></span></p><p style='margin:0in;margin-bottom:.0001pt;line-height:13.5pt;background:white;vertical-align:baseline'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>I'm trying to read the static securities definition file from the CME, located at:<a href="ftp://ftp.cmegroup.com/fix/Production/secdef.dat.gz"><span style='color:#4A6B82;border:none windowtext 1.0pt;padding:0in;text-decoration:none'>ftp://ftp.cmegroup.com/fix/Production/secdef.dat.gz</span></a><o:p></o:p></span></p><p style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;line-height:13.5pt;background:white;vertical-align:baseline;word-wrap: break-word;orphans: 2;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:initial initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>Since they seem to be standard fix messages, I thought I could use QuickFix to help me read them into C# rather than parsing the file myself. I created a test app that basically does what I want, but I'm having 2 issues:<o:p></o:p></span></p><p style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;line-height:13.5pt;background:white;vertical-align:baseline;word-wrap: break-word;orphans: 2;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:initial initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>1) I'm getting a QuickFix exception "Invalid message: Header fields out of order" when forming the message from the string. If I set the "validate" boolean to false, this message disappears and the constructor succeeds, but may be an indicator for the next issue.<o:p></o:p></span></p><p style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;line-height:13.5pt;background:white;vertical-align:baseline;word-wrap: break-word;orphans: 2;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:initial initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>2) Upon calling p.Crack, I'm getting the QuickFix exception "QuickFix.UnsupportedMessageType", but there doesn't seem to be any indication of what the message type is that is supposedly unsupported.<o:p></o:p></span></p><p style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;line-height:13.5pt;background:white;vertical-align:baseline;word-wrap: break-word;orphans: 2;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:initial initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>Anyway, maybe QuickFix wasn't intended to be used in this way, but any ideas on how to get this to work?<o:p></o:p></span></p><p style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;line-height:13.5pt;background:white;vertical-align:baseline'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>Thanks,<o:p></o:p></span></p><p style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;line-height:13.5pt;background:white;vertical-align:baseline'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>Ted<o:p></o:p></span></p><p style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:0in;line-height:13.5pt;background:white;vertical-align:baseline'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'><o:p> </o:p></span></p><p class=MsoNormal>using System;<o:p></o:p></p><p class=MsoNormal>using System.IO;<o:p></o:p></p><p class=MsoNormal>using System.Collections.Generic;<o:p></o:p></p><p class=MsoNormal>using System.Text;<o:p></o:p></p><p class=MsoNormal>using QuickFix;<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>namespace TestQuickFix<o:p></o:p></p><p class=MsoNormal>{<o:p></o:p></p><p class=MsoNormal> class Program : QuickFix.MessageCracker<o:p></o:p></p><p class=MsoNormal> {<o:p></o:p></p><p class=MsoNormal> static void Main(string[] args)<o:p></o:p></p><p class=MsoNormal> {<o:p></o:p></p><p class=MsoNormal> int count = 0;<o:p></o:p></p><p class=MsoNormal> string line;<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Program p = new Program();<o:p></o:p></p><p class=MsoNormal> StreamReader file = new StreamReader(@"C:\secdef.dat");<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> while (((line = file.ReadLine()) != null && count < 10))<o:p></o:p></p><p class=MsoNormal> {<o:p></o:p></p><p class=MsoNormal> // ISSUE #1 REQUIRES false 2ND ARG WHEN CREATING THE MESSAGE<o:p></o:p></p><p class=MsoNormal> Message m = new Message(line, false); <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> // ISSUE #2 Exception of type 'QuickFix.UnsupportedMessageType' was thrown.<o:p></o:p></p><p class=MsoNormal> p.Crack(m, new SessionID("beginString", "senderCompID", "targetCompID"));<o:p></o:p></p><p class=MsoNormal> }<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> file.Close();<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> }<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> public void OnMessage(QuickFix.FIX50.SecurityDefinition secDef, SessionID sessionID)<o:p></o:p></p><p class=MsoNormal> {<o:p></o:p></p><p class=MsoNormal> Console.WriteLine(secDef.ToString());<o:p></o:p></p><p class=MsoNormal> }<o:p></o:p></p><p class=MsoNormal> }<o:p></o:p></p><p class=MsoNormal>}<o:p></o:p></p></div></body></html>