Re: [Quickfix-developers] getGroup in MarketDataIncrementalRefresh
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2004-09-07 23:18:51
|
Well, I wrote this unit test and everything passed: public void testMessageWithGroupFromString() { Message message =3D null; DataDictionary dataDictionary =3D new =20 DataDictionary("../../spec/FIX42.xml"); boolean badMessage =3D false; try { message =3D new =20 Message("8=3DFIX.4.2\0019=3D0132\00135=3DX\00149=3DBLP\00156=3DCRWND\00134= =3D805\001=20 52=3D20040907-20:42:=20 43\00150=3DBTRADE\00157=3DDPT\001268=3D1\001279=3D2\001269=3D0\001278=3D12= 2906\00155=20 =3DMSFT\001270=3D27.35\001271=3D0\001273=3D20:42:43\00110=3D190\001", =20= dataDictionary, true); NoMDEntries noMDEntries =3D new NoMDEntries(); MarketDataIncrementalRefresh.NoMDEntries group =3D new =20 MarketDataIncrementalRefresh.NoMDEntries(); message.getField( noMDEntries ); message.getGroup( 1, group ); } catch(InvalidMessage im) { assertTrue("Message should be valid", false); } catch(FieldNotFound fnf) { assertTrue("Group should be present", false); } } Does this look like what you are doing? Can you post the code you are =20= using to pull the group out? --oren On Sep 7, 2004, at 5:34 PM, Sanjay Verma wrote: > I am using QFIX 1.8 on RH Linux 9 Kernel 2.4.20-31.9. I am using the =20= > FIX42.xml file supplied with QuickFIX for the DataDictionary. > > I did not expect an exception! Field 268 is present in the message. > > =A0 > > Sanjay Verma > > sv...@ev... > > =A0 > > -----Original Message----- > From: Oren Miller [mailto:or...@qu...] > Sent: Tuesday, September 07, 2004 5:57 PM > To: sv...@ev... > Subject: Re: [Quickfix-developers] getGroup in =20 > MarketDataIncrementalRefresh > > =A0 > > A more appropriate exception to throw would probably be GroupNotFound. = =20 > Can you please verify which version of QuickFIX you are using, the =20 > operating system, and if you are using a DataDictionary. > > --oren > > On Sep 7, 2004, at 3:54 PM, Sanjay Verma wrote: > > When trying to get group # 1 in the following message I get an error =20= > saying field 268 is not found. Lookingt at the text of the message I =20= > see field 268. Is this a known issue? I have added two lines to =20 > FieldMap.cpp in function getGroup to see if my parameters were being =20= > passed correctly. The first line prints the first parameter (int num) =20= > and the second line prints i->second.size(). > > =A0 > > Message text with delimiters: > > =A0 > > =20 > 8=3DFIX.4.2^A9=3D0132^A35=3DX^A49=3DBLP^A56=3DCRWND^A34=3D805^A52=3D2004= 0907-20:42:=20 > = 43^A50=3DBTRADE^A57=3DDPT^A268=3D1^A279=3D2^A269=3D0^A278=3D122906^A55=3DM= SFT^A270=3D27=20 > .35^A271=3D0^A273=3D20:42:43^A10=3D190^A > > =A0 > > =A0 > > 16:42:43.206 [13] FINER=A0=A0 FIXAdapter:fromApp=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 Received: =20 > 8=3DFIX.4.29=3D13235=3DX34=3D80549=3DBLP50=3DBTRADE52=3D20040907-20:42:=20= > 4356=3DCRWND57=3DDPT55=3DMSFT268=3D1269=3D0270=3D27.35271=3D0273=3D20:42= :=20 > 43278=3D122906279=3D210=3D142 > > 16:42:43.206 [13] FINE=A0=A0=A0 FromFIX:onMessage=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 OnMessage: =20 > Handling fix msg > > Looking for group # 1 > > Found group index =3D -25001983 > > 16:42:43.243 [13] WARNING FromFIX:onMessage=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 Error: 268 > > quickfix.FieldNotFound: 268 > > =A0=A0=A0=A0=A0=A0=A0 at quickfix.Message.getGroup(Native Method) > > =A0=A0=A0=A0=A0=A0=A0 at =20 > com.ets.pinnacle.mktdata.btrd.FromFIX.onMessage(FromFIX.java:48) > > =A0=A0=A0=A0=A0=A0=A0 at = quickfix.fix42.MessageCracker.crack42(Unknown Source) > > =A0=A0=A0=A0=A0=A0=A0 at quickfix.MessageCracker.crack(Unknown = Source) > > =A0=A0=A0=A0=A0=A0=A0 at =20 > com.ets.pinnacle.mktdata.btrd.FIXAdapter.fromApp(FIXAdapter.java:92) > > =A0=A0=A0=A0=A0=A0=A0 at quickfix.SocketInitiator.doBlock(Native = Method) > > =A0=A0=A0=A0=A0=A0=A0 at quickfix.SocketInitiator.block(Unknown = Source) > > =A0=A0=A0=A0=A0=A0=A0 at =20 > com.ets.pinnacle.mktdata.btrd.FIXAdapter.run(FIXAdapter.java:116) > > 16:42:51.040 [13] INFO=A0=A0=A0 FIXAdapter:toAdmin=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 Sent admin =20 > msg > > =A0 > > Sanjay Verma > > sv...@ev... > > =A0 |