<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: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=iso-8859-2"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","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.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Besedilo oblačka Znak";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.E-potniSlog17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.E-potniSlog18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BesedilooblakaZnak
{mso-style-name:"Besedilo oblačka Znak";
mso-style-priority:99;
mso-style-link:"Besedilo oblačka";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
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=SL link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I had the same problem how to handle custom messages. In QuickFIX c++ I solve that problem with implementing my DefaultMessageFactory derived class and all my type safe custom messages classes for sending and receiving (this was done without changing c++ dll)… When I port my derived FIX engine to QuickFIX/n I discover that DefaultMessageFactory isn’t support as parameter in ThreadedSocketAcceptor and SocketInitiator so I decide to made this change in QuickFIX/n source and public it for public use (this changes still wait in github Pull Requests). In my forked source of QuickFixn you can also find how to use and handle custom type safe messages (custom-fields-groups-and-messages.md).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I’m not fan to make unpublished custom modification on third party libraries to pleased application needs because this makes future trouble on any third party library update.<o:p></o:p></span></p><div><p class=MsoNormal><b><i><span lang=EN-US style='font-size:11.0pt;color:#1F497D'><o:p> </o:p></span></i></b></p><p class=MsoNormal><b><i><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>best regards<o:p></o:p></span></i></b></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;color:#1F497D'>Ervin MARGUC<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> quickfixn-bounces@lists.quickfixn.com [mailto:quickfixn-bounces@lists.quickfixn.com] <b>On Behalf Of </b>Felipe Soares<br><b>Sent:</b> Wednesday, August 01, 2012 1:23 PM<br><b>To:</b> Grant Birchmeier; Mailing list for QuickFIX/n<br><b>Subject:</b> {{Quickfixn}} RES: felipe's custom message problem<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Grant,</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>We downloaded the source code and are trying this other direction since the other one isn´t working, but do you have any tutorial of how I am supposed to do it?</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>regards</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Grant Birchmeier [mailto:<a href="mailto:gbirchmeier@connamara.com">gbirchmeier@connamara.com</a>] <br><b>Enviada em:</b> terça-feira, 31 de julho de 2012 12:57<br><b>Para:</b> Mailing list for QuickFIX/n; Felipe Soares<br><b>Assunto:</b> Re: {{Quickfixn}} felipe's custom message problem</span><span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US style='color:black'>Furthermore, I'd recommend that you actually look into downloading the QF/N source and regenerating a version according to your custom FIX44.xml DD. However, you'll need Ruby to generate the source.</span><span lang=EN-US><o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='color:black'>This will give you a FIX44 version of </span><span lang=EN-US>the ApplicationMessageRequest and field methods. These are preferred over the generic methods.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>-Grant<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US>On Tue, Jul 31, 2012 at 10:52 AM, Grant Birchmeier <<a href="mailto:gbirchmeier@connamara.com" target="_blank">gbirchmeier@connamara.com</a>> wrote:<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>Felipe,<br><br>In this an future discussions, I highly recommend that you turn off digest mode. It's making it difficult to follow the discussion when the subject lines are constantly changing.<br><br>Problem 1: In your cfg file, you need to add UseDataDictionary=Y<br><br>Problem 2: You are not constructing your repeating group correctly.<br><br>Problem 3: You were not using the correct message constructor. (The first parameter to Message(string,bool) is an entire FIX message string, not just the 35 field.)<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US>To construct your message with generic methods, it should look like this:<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US> QuickFix.Message m = new Message();<br> m.Header.SetField(new BeginString("FIX.4.4"));<br> m.SetField(new QuickFix.Fields.StringField(35, "BW"));<br><br> m.SetField(new QuickFix.Fields.StringField(1346, "TRADER")); //AppReqId<br> m.SetField(new QuickFix.Fields.IntField(1347, 0)); //ApplReqType<br><br> int[] ordering = {1355,1182,1183};<br> Group g = new Group(1351, 1355, ordering);<br><br> // first group element<br> g.SetField(new QuickFix.Fields.StringField(1355,("foo"))); //RefApplID<br> g.SetField(new QuickFix.Fields.IntField(1182, 10)); //ApplBegSeqNum<br> g.SetField(new QuickFix.Fields.IntField(1183, 20)); //ApplEndSeqNum<br> m.AddGroup(g);<br><br> // second group element<br> g.SetField(new QuickFix.Fields.StringField(1355, ("bar"))); //RefApplID<br> g.SetField(new QuickFix.Fields.IntField(1182, 11)); //ApplBegSeqNum<br> g.SetField(new QuickFix.Fields.IntField(1183, 22)); //ApplEndSeqNum<br> m.AddGroup(g);<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US> Console.WriteLine(m.ToString());<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> // prints 8=FIX.4.4|9=82|35=BW|1346=TRADER|1347=0|1351=2|1355=foo|1182=10|1183=20|1355=bar|1182=11|1183=22|10=202|<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US><br><br>--<br>Grant Birchmeier<br>Connamara Systems, LLC<br>Made-To-Measure Trading Solutions.<br>Exactly what you need. No more. No less.<br><a href="http://connamara.com" target="_blank">http://connamara.com</a><br><br>_______________________________________________<br>Quickfixn mailing list<br><a href="mailto:Quickfixn@lists.quickfixn.com">Quickfixn@lists.quickfixn.com</a><br><a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US><br><br clear=all><br>-- <o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US style='background:white'>Grant Birchmeier</span><span lang=EN-US><o:p></o:p></span></p></div><div><p class=MsoNormal><b><span lang=EN-US style='color:#3333FF;background:#FFCC00'>Connamara Systems, LLC</span></b><span lang=EN-US><o:p></o:p></span></p></div><div><p class=MsoNormal><b><span lang=EN-US>Made-To-Measure Trading Solutions.</span></b><span lang=EN-US><o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Exactly what you need. No more. No less.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><a href="http://connamara.com" target="_blank">http://connamara.com</a><o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p></div></body></html>