Re: [Quickfix-developers] Fwd: Problems with MarketDataIncrementalRefresh
Brought to you by:
orenmnero
From: Andre D. <an...@al...> - 2009-06-24 02:42:34
|
Hi Djalma, It works! Creating the message with the DataDictionary, the group was found. But just the first one! Even the method: message.toXML() is reporting one group as follow: <message> <header> <field number="8"><![CDATA[FIX.4.4]]></field> <field number="9"><![CDATA[529]]></field> <field number="35"><![CDATA[X]]></field> <field number="34"><![CDATA[7]]></field> <field number="49"><![CDATA[TradingEngineDerivatives01A]]></field> <field number="52"><![CDATA[20080501-03:35:23.395]]></field> <field number="56"><![CDATA[FIXGatewayDerivatives_MD]]></field> </header> <body> <field number="22"><![CDATA[8]]></field> <field number="22"><![CDATA[8]]></field> <field number="22"><![CDATA[8]]></field> <field number="48"><![CDATA[BMFBR7310047]]></field> <field number="48"><![CDATA[BMFBR7310047]]></field> <field number="48"><![CDATA[BMFBR7310047]]></field> <field number="55"><![CDATA[BGIJ08]]></field> <field number="55"><![CDATA[BGIJ08]]></field> <field number="55"><![CDATA[BGIJ08]]></field> <field number="75"><![CDATA[20080501]]></field> <field number="268"><![CDATA[4]]></field> <field number="269"><![CDATA[d]]></field> <field number="269"><![CDATA[b]]></field> <field number="269"><![CDATA[5]]></field> <field number="270"><![CDATA[77.33]]></field> <field number="272"><![CDATA[20080501]]></field> <field number="272"><![CDATA[20080501]]></field> <field number="272"><![CDATA[20080501]]></field> <field number="273"><![CDATA[03:35:10]]></field> <field number="273"><![CDATA[03:35:10]]></field> <field number="273"><![CDATA[03:35:23]]></field> <field number="278"><![CDATA[2]]></field> <field number="278"><![CDATA[3]]></field> <field number="279"><![CDATA[2]]></field> <field number="279"><![CDATA[1]]></field> <field number="279"><![CDATA[0]]></field> <field number="326"><![CDATA[120]]></field> <field number="336"><![CDATA[TradingSessionID]]></field> <field number="336"><![CDATA[TradingSessionID]]></field> <field number="336"><![CDATA[TradingSessionID]]></field> <field number="625"><![CDATA[I]]></field> <field number="10016"><![CDATA[7993_739]]></field> <group> <field number="279"><![CDATA[1]]></field> <field number="269"><![CDATA[c]]></field> <field number="278"><![CDATA[1]]></field> <field number="55"><![CDATA[BGIJ08]]></field> <field number="48"><![CDATA[BMFBR7310047]]></field> <field number="22"><![CDATA[8]]></field> <field number="272"><![CDATA[20080501]]></field> <field number="273"><![CDATA[03:35:10]]></field> <field number="336"><![CDATA[TradingSessionID]]></field> </group> </body> <trailer> <field number="10"><![CDATA[167]]></field> </trailer> ------------------------------------------ For this FIX message: 8=FIX.4.4 9=529 35=X 34=7 49=TradingEngineDerivatives01A 52=20080501-03:35:23.395 56=FIXGatewayDerivatives_MD 10016=7993_739 75=20080501 268=4 279=1 269=c 278=1 55=BGIJ08 48=BMFBR7310047 22=8 272=20080501 273=03:35:10 336=TradingSessionID 326=120 279=2 269=d 278=2 55=BGIJ08 48=BMFBR7310047 22=8 272=20080501 273=03:35:10 336=TradingSessionID 279=1 269=b 278=3 55=BGIJ08 48=BMFBR7310047 22=8 272=20080501 273=03:35:10 336=TradingSessionID 625=I 279=0 269=5 55=BGIJ08 48=BMFBR7310047 22=8 270=77.33 272=20080501 273=03:35:23 336=TradingSessionID 10=167 ---------------------------------------- I'm missing something? Thanks, Andre B Derraik. ALBD Consulting On Sun, Jun 21, 2009 at 11:53 AM, Djalma Rosa dos Santos Filho < drs...@gm...> wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > Hi Andre, > > Make sure you are using the constructor bellow that receives the > DataDictionary, otherwise quickfix won't be able to process the > repeating groups in the message. > > Message( const std::string& string, const DataDictionary& > dataDictionary, > bool validate = true ) > > Djalma > > On Fri, Mar 6, 2009 at 3:38 PM, Andre > Derraik<and...@al... <andre%2B...@al...>> > wrote: > > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > > QuickFIX Support: http://www.quickfixengine.org/services.html > > > > > > Hi All, > > > > I'm new with quickfix, but I'm creating a application to read a text file > with FIX lines. > > I use the Parser class to validate the message and it's OK. > > > > ------------------------------------- > > 8=FIX.4.4 9=628 35=X 34=2 49=TradingEngineDerivatives01A > 52=20080501-03:35:23.379 56=FIXGatewayDerivatives_MD 10016=15977_1 > 75=20080501 268=5 279=1 269=c 278=1 55=BGIJ09 48=BMFBR7312910 22=8 > 272=20080501 273=03:35:10 336=TradingSessionID 326=122 279=2 269=d 278=2 > 55=BGIJ09 48=BMFBR7312910 22=8 272=20080501 273=03:35:10 > 336=TradingSessionID 279=1 269=b 278=3 55=BGIJ09 48=BMFBR7312910 22=8 > 272=20080501 273=03:35:10 336=TradingSessionID 625=I 279=1 269=c 278=4 > 55=BGIJ09 48=BMFBR7312910 22=8 272=20080501 273=03:35:10 > 336=TradingSessionID 326=122 279=2 269=d 278=5 55=BGIJ09 48=BMFBR7312910 > 22=8 272=20080501 273=03:35:10 336=TradingSessionID 10=034 > > > > 8=FIX.4.4 9=630 35=X 34=3 49=TradingEngineDerivatives01A > 52=20080501-03:35:23.395 56=FIXGatewayDerivatives_MD 10016=14827_105 > 75=20080501 268=5 279=1 269=c 278=1 55=BGIH09 48=BMFBR7312795 22=8 > 272=20080501 273=03:35:10 336=TradingSessionID 326=122 279=2 269=d 278=2 > 55=BGIH09 48=BMFBR7312795 22=8 272=20080501 273=03:35:10 > 336=TradingSessionID 279=1 269=b 278=3 55=BGIH09 48=BMFBR7312795 22=8 > 272=20080501 273=03:35:10 336=TradingSessionID 625=I 279=1 269=c 278=4 > 55=BGIH09 48=BMFBR7312795 22=8 272=20080501 273=03:35:10 > 336=TradingSessionID 326=122 279=2 269=d 278=5 55=BGIH09 48=BMFBR7312795 > 22=8 272=20080501 273=03:35:10 336=TradingSessionID 10=165 > > ------------------------------------- > > > > But when I send to the MessageCracker I have problems. > > > > When I try to get the NoMDEntries group I got an error: FieldNotFound. > > > > ------------------------------------- > > // Test if we have the groups > > FIX44::MarketDataIncrementalRefresh::NoMDEntries noMDEntriesGroup; > > if( !message.hasGroup( noMDEntriesGroup ) ) > > { > > std::cout << "\n\tInvalid Message: no Group\n]\n"; > > return; > > } > > > > // Read a entry group > > try > > { > > message.getGroup( 1, noMDEntriesGroup ); > > } > > catch( FIX::FieldNotFound e ) > > { > > std::cout << "\tnoGroup(" << e.field << ")"; > > continue; > > } > > ------------------------------------- > > > > Investigating the problem, I try to use the DataDictinary to validate the > message: > > > > ------------------------------------- > > DD_FIX44 = new FIX::DataDictionary( > "/opt/quickfix/share/quickfix/FIX44.xml" ); > > > > try > > { > > const std::string& msgTypeValue = message.getHeader().getField( > FIX::FIELD::MsgType ); > > std::string str; > > DD_FIX44->getFieldName( 22, str ); > > std::cout << "[ " << str << " ] " > > << msgTypeValue << " " > > << DD_FIX44->isMsgField( msgTypeValue, 22 ) << std::endl; > > > > DD_FIX44->validate( message ); > > } > > catch( FIX::TagNotDefinedForMessage e ) > > { > > std::cout << "Problems: [ TagNotDefinedForMessage " << e.field << > e.detail > > << " ]" << std::endl; > > } > > > > OUTPUT: > > [ SecurityIDSource ] X 0 > > Problems: [ TagNotDefinedForMessage 22 ] > > > > ------------------------------------- > > > > The problem is: the tag 22 (SecurityIDSource), present in the FIX > messages, is return that is NOT defined for the message. > > But looking at the XML and the "fix44/MarketDataIncrementalRefresh.h" is > defined! > > > > So, any one with this problem? Any help? > > > > Thanks in advance, > > Andre B Derraik. > > ALBD Consulting > > > |