Thread: [Quickfix-users] Duplicate EncryptMethod field in Logon Message
Brought to you by:
orenmnero
From: Robert P. <rob...@gm...> - 2007-01-19 20:56:37
|
Hi Folks, I'm finding that the outgoing Logon message from my code, using quickfix 1.12.4 (actually later from SVN) is setting the EncryptMethod field 98 twice. This is causing a counterparty to reject to logon attempt. Has anyone seen this before? I'm using quickfix with the python bindings, and am finding that in the quickfix callback fromApp, the message itself doesn't show this duplicate field, but the mesage logged by quickfix, and thae message actually sent over the wire, has this extra field. Looking at the source, I see that in the Logon message class (i.e. fix42/Logon.h) this field is set when the Logon class is instantiated. Then in Session.cpp, I see that this field is set again. I guess I'd assume that it wouldn't end up with duplicate fields, but that's what I'm seeing. Any thoughts? rob |
From: Oren M. <or...@qu...> - 2007-01-21 13:58:36
|
Are you perhaps accidentally adding n EncryptMethod field to the header? --oren On Jan 19, 2007, at 2:56 PM, Robert Parrott wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ > html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > Hi Folks, > > I'm finding that the outgoing Logon message from my code, using > quickfix 1.12.4 (actually later from SVN) is setting the EncryptMethod > field 98 twice. > > This is causing a counterparty to reject to logon attempt. > > Has anyone seen this before? > > I'm using quickfix with the python bindings, and am finding that in > the quickfix callback fromApp, the message itself doesn't show this > duplicate field, but the mesage logged by quickfix, and thae message > actually sent over the wire, has this extra field. > > Looking at the source, I see that in the Logon message class (i.e. > fix42/Logon.h) this field is set when the Logon class is > instantiated. Then in Session.cpp, I see that this field is set again. > I guess I'd assume that it wouldn't end up with duplicate fields, but > that's what I'm seeing. > > Any thoughts? > > rob |
From: Robert P. <rob...@gm...> - 2007-01-22 14:47:07
|
Nope, Nowhere in my python code do I even refer to this Field, let alone try to add it. Whatever is happening is due to the quickfix engine code itself. rob On 1/21/07, Oren Miller <or...@qu...> wrote: > Are you perhaps accidentally adding n EncryptMethod field to the header? > > --oren > > On Jan 19, 2007, at 2:56 PM, Robert Parrott wrote: > > > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ > > html/index.html > > QuickFIX Support: http://www.quickfixengine.org/services.html > > > > Hi Folks, > > > > I'm finding that the outgoing Logon message from my code, using > > quickfix 1.12.4 (actually later from SVN) is setting the EncryptMethod > > field 98 twice. > > > > This is causing a counterparty to reject to logon attempt. > > > > Has anyone seen this before? > > > > I'm using quickfix with the python bindings, and am finding that in > > the quickfix callback fromApp, the message itself doesn't show this > > duplicate field, but the mesage logged by quickfix, and thae message > > actually sent over the wire, has this extra field. > > > > Looking at the source, I see that in the Logon message class (i.e. > > fix42/Logon.h) this field is set when the Logon class is > > instantiated. Then in Session.cpp, I see that this field is set again. > > I guess I'd assume that it wouldn't end up with duplicate fields, but > > that's what I'm seeing. > > > > Any thoughts? > > > > rob > > |
From: Oren M. <or...@qu...> - 2007-01-22 15:30:54
|
Wait a second. In your original message you say that the message comes through fromApp (I assume you mean fromAdmin?). If that is the case then the message is coming from the counterparty. Can you confirm? --oren > Nope, > > Nowhere in my python code do I even refer to this Field, let alone try > to add it. Whatever is happening is due to the quickfix engine code > itself. > > rob > > On 1/21/07, Oren Miller <or...@qu...> wrote: >> Are you perhaps accidentally adding n EncryptMethod field to the >> header? >> >> --oren >> >> On Jan 19, 2007, at 2:56 PM, Robert Parrott wrote: >> >>> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ >>> html/index.html >>> QuickFIX Support: http://www.quickfixengine.org/services.html >>> >>> Hi Folks, >>> >>> I'm finding that the outgoing Logon message from my code, using >>> quickfix 1.12.4 (actually later from SVN) is setting the >>> EncryptMethod >>> field 98 twice. >>> >>> This is causing a counterparty to reject to logon attempt. >>> >>> Has anyone seen this before? >>> >>> I'm using quickfix with the python bindings, and am finding that in >>> the quickfix callback fromApp, the message itself doesn't show this >>> duplicate field, but the mesage logged by quickfix, and thae message >>> actually sent over the wire, has this extra field. >>> >>> Looking at the source, I see that in the Logon message class (i.e. >>> fix42/Logon.h) this field is set when the Logon class is >>> instantiated. Then in Session.cpp, I see that this field is set >>> again. >>> I guess I'd assume that it wouldn't end up with duplicate fields, >>> but >>> that's what I'm seeing. >>> >>> Any thoughts? >>> >>> rob >> >> > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Quickfix-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-users > |
From: Robert P. <rob...@gm...> - 2007-01-23 16:42:11
|
After reviewing the code again, I am setting this tag again in the fromAdmin callback. My apologies there. The line is message.getHeader().setField(98, "0") My followup question is: Why does quickfix allow a duplication of such a field? From the API, I assumed that "setting" a field means setting a field to a certain value, not adding another copy of the field if already present. It seems that this method would be better named "addField", not "setField". Are there times when there needs to be two copies of the same field in a message header? If not, would you consider modifying the code so that "set" methods behave in this way, as opposed to behaving like an "add" method? thanks, rob On 1/22/07, Oren Miller <or...@qu...> wrote: > Wait a second. In your original message you say that the message > comes through fromApp (I assume you mean fromAdmin?). If that is the > case then the message is coming from the counterparty. Can you confirm? > > --oren > > > Nope, > > > > Nowhere in my python code do I even refer to this Field, let alone try > > to add it. Whatever is happening is due to the quickfix engine code > > itself. > > > > rob > > > > On 1/21/07, Oren Miller <or...@qu...> wrote: > >> Are you perhaps accidentally adding n EncryptMethod field to the > >> header? > >> > >> --oren > >> > >> On Jan 19, 2007, at 2:56 PM, Robert Parrott wrote: > >> > >>> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/ > >>> html/index.html > >>> QuickFIX Support: http://www.quickfixengine.org/services.html > >>> > >>> Hi Folks, > >>> > >>> I'm finding that the outgoing Logon message from my code, using > >>> quickfix 1.12.4 (actually later from SVN) is setting the > >>> EncryptMethod > >>> field 98 twice. > >>> > >>> This is causing a counterparty to reject to logon attempt. > >>> > >>> Has anyone seen this before? > >>> > >>> I'm using quickfix with the python bindings, and am finding that in > >>> the quickfix callback fromApp, the message itself doesn't show this > >>> duplicate field, but the mesage logged by quickfix, and thae message > >>> actually sent over the wire, has this extra field. > >>> > >>> Looking at the source, I see that in the Logon message class (i.e. > >>> fix42/Logon.h) this field is set when the Logon class is > >>> instantiated. Then in Session.cpp, I see that this field is set > >>> again. > >>> I guess I'd assume that it wouldn't end up with duplicate fields, > >>> but > >>> that's what I'm seeing. > >>> > >>> Any thoughts? > >>> > >>> rob > >> > >> > > > > ---------------------------------------------------------------------- > > --- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to > > share your > > opinions on IT & business topics through brief surveys - and earn cash > > http://www.techsay.com/default.php? > > page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Quickfix-users mailing list > > Qui...@li... > > https://lists.sourceforge.net/lists/listinfo/quickfix-users > > > > |
From: Oren M. <or...@qu...> - 2007-01-23 17:30:55
|
Because field 98 is not a header field. It is a body field of the Logon message. If you had set the field on the body of the message, you would not see a duplicate. --oren > My followup question is: Why does quickfix allow a duplication of such > a field? From the API, I assumed that "setting" a field means setting > a field to a certain value, not adding another copy of the field if > already present. It seems that this method would be better named > "addField", not "setField". > > Are there times when there needs to be two copies of the same field in > a message header? If not, would you consider modifying the code so > that "set" methods behave in this way, as opposed to behaving like an > "add" method? |