Re: [Quickfix-developers] Problem in Grouping
Brought to you by:
orenmnero
From: Oren M. <ore...@ya...> - 2003-07-18 14:23:22
|
Yeah, this comes up way too much. Likely you are not specifying a DataDictionary. This is the most confusing (understandably so) issue for new users. The upcoming 1.6 release should do away with 99% of this confusion. --- Parag Tawde <PT...@tc...> wrote: > Hi > > I am sending an Allocation message to FIX Engine. > using version: FIX 1.5.0 C++ > > Problem: > 1. > Allocation message is received on engine side to its > onMessage Callback if > the number of groups > added is 1. > > If I increase this grouping to 2 or more , no > callback is invoked. In short > FIX engine applications onMessage is not called. > > 2. > Group not found error. > > When I send single group. I do get callback. But > while reteriving group it > throws exception FieldNotFound. > > Here is my Client Code & Server Code > > > Client Code: > > > void Application::queryAllocation() > { > int ordersCombined; > > FIX::TransactTime > transTime(FIX::TransactTime()); > > FIX::AllocID aAllocID("123"); > FIX::AllocTransType > aAllocTransType(FIX::AllocTransType_NEW); > FIX::Side aSide(FIX::Side_BUY); > FIX::Symbol > aSymbol("AllocationTest"); > FIX::Shares aShares(100); > FIX::AvgPx aAvgPx(111.11); > FIX::TradeDate > aTradeDate(transTime.getString().c_str()); > > FIX42::Allocation allocation = > FIX42::Allocation( > aAllocID,aAllocTransType, > aSide,aSymbol, > aShares,aAvgPx, > aTradeDate ); > > string strSenderCompId = "CLIENT1"; > string strTargetCompId = "TW"; > > > allocation.getHeader().setField(FIX::SenderCompID(strSenderCompId)); > > allocation.getHeader().setField(FIX::TargetCompID(strTargetCompId)); > > allocation.setField(FIX::NoOrders(ordersCombined)); > > FIX42::Allocation::NoOrders noOrdersGroup; > > cout << endl << "Number of Orders:"; > cin >> ordersCombined; > > for(int index=0; index <ordersCombined; > index++) > { > string clorderId; > cout << "ClOrder ID: " ; > cin >> clorderId; > > > noOrdersGroup.set(FIX::ClOrdID(clorderId)); > allocation.addGroup(noOrdersGroup); > } > > if ( queryConfirm( "Send Allocation" ) ) > { > FIX::Session::sendToTarget( allocation ); > } > } > > > Server Side: > void > Application::onMessage( const FIX42::Allocation& > message, const > FIX::SessionID& sessionID) > { > FIX::NoOrders combinedOrdersCount; > > message.get(combinedOrdersCount); > > cout << > combinedOrdersCount.getString() << endl; > > FIX42::Allocation::NoOrders group; > > //HERE IT THROWS EXCEPTION > FIELDNOTFOUND > message.getGroup(1,group); > > } > > I appreciate your helping me to resolve this issue > > Thanks > Parag > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems > on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell > virtual machines at the > same time. Free trial click here: > http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com |