[Quickfix-developers] data dictionary not being set
Brought to you by:
orenmnero
From: Nick R. <nic...@gm...> - 2008-03-18 04:06:41
|
Hi, How do I get QF to use the data dictionary. AFAIK everything is in the right place but when I call "message.toXML()" the field names are not printed because the dictionary is not set. I have the following in my config file UseDataDictionary=Y DataDictionary=/home/nri/wa/wtfldgw/etc/FIX42.xml It's being loaded by the app because when I dump the setting I see.. [DEFAULT] BEGINSTRING=FIX.4.2 CHECKLATENCY=N CONNECTIONTYPE=initiator DATADICTIONARY=/home/nri/wa/wtfldgw/etc/FIX42.xml ENDTIME=23:59:59 FILELOGPATH=/home/nri/wa/wtfldgw/logs FILESTOREPATH=/home/nri/wa/wtfldgw/logs HEARTBTINT=30 HTTPACCEPTPORT=20001 MILLISECONDSINTIMESTAMP=N PERSISTMESSAGES=Y RECONNECTINTERVAL=10 REFRESHONLOGON=Y RESETONDISCONNECT=N RESETONLOGON=N RESETONLOGOUT=N SOCKETCONNECTHOST=127.0.0.1 SOCKETCONNECTPORT=20000 STARTTIME=00:00:00 USEDATADICTIONARY=Y [SESSION] SENDERCOMPID=WTFLD TARGETCOMPID=OM My app is created as FIX::SessionSettings settings(gatewayConfig->configFile); cout << "FIXSetting" << endl << settings << endl; Application application; FIX::FileStoreFactory storeFactory( settings ); FIX::FileLogFactory logFactory(settings); FIX::SocketInitiator initiator( application, storeFactory, settings, logFactory ); Everything works but when I try to print the messages using cout << message.toXML() << endl; cout << message << endl; there is no name, Note that toXML() calls toXMLFields() and I modified it to print NoDD as in following code snipet stream << std::setw(space) << " " << "<field "; if(s_dataDictionary.get() && s_dataDictionary->getFieldName(field, name)) { stream << "name=\"" << name << "\" "; } else { stream << "No DD " ; // *** CHANGED THIS TO PRINT NoDD...... } stream << "number=\"" << field << "\""; Notice the NoDD's printed belkow. <message> <header> <field NoDD number="8"><![CDATA[FIX.4.2]]></field> <field NoDD number="9"><![CDATA[142]]></field> <field NoDD number="35"><![CDATA[8]]></field> <field NoDD number="34"><![CDATA[3]]></field> <field NoDD number="49"><![CDATA[OM]]></field> <field NoDD number="52"><![CDATA[20080318-03:13:44.515]]></field> <field NoDD number="56"><![CDATA[WTFLD]]></field> </header> <body> <field NoDD number="6"><![CDATA[0]]></field> <field NoDD number="11"><![CDATA[599.0]]></field> <field NoDD number="14"><![CDATA[0]]></field> <field NoDD number="17"><![CDATA[60]]></field> <field NoDD number="20"><![CDATA[0]]></field> <field NoDD number="22"><![CDATA[5]]></field> <field NoDD number="37"><![CDATA[599.0]]></field> <field NoDD number="38"><![CDATA[600]]></field> <field NoDD number="39"><![CDATA[0]]></field> <field NoDD number="48"><![CDATA[RDSb.L]]></field> <field NoDD number="54"><![CDATA[2]]></field> <field NoDD number="55"><![CDATA[RDSb]]></field> <field NoDD number="150"><![CDATA[0]]></field> <field NoDD number="151"><![CDATA[600]]></field> </body> <trailer> <field NoDD number="10"><![CDATA[103]]></field> </trailer> </message> 8=FIX.4.29=14235=834=349=OM52=20080318-03:13:44.51556=WTFLD6=011=599.014=017=6020=022=537=599.038=60039=048=RDSb.L54=255=RDSb150=0151=60010=103 I also tried moving the data dictionary from the default to the session section in the config file but without any luck Anyone know whats wrong here ? regards Nick |