Re: [Quickfix-developers] Invalid Message
Brought to you by:
orenmnero
From: <or...@qu...> - 2008-05-20 15:08:03
|
I'm guessing this line is confusing it: o.set(FIX::TimeInForce(1)); You are passing in an integer when it should be a character. --oren > -------- Original Message -------- > Subject: [Quickfix-developers] Invalid Message > From: Vincent Predoehl <vpr...@ph...> > Date: Mon, May 19, 2008 10:25 pm > To: qui...@li... > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html<hr>Why am I getting a BodyLength error in this message? > Logon: FIX.4.4:MP->CLIENT > <20080520-03:06:57, FIX.4.4:MP->CLIENT, incoming> > (8=FIX. > 4.49=10935=D34=249=CLIENT52=20080520-03:06:57.93356=MP11=121=138=50040=1 > 54=255=C59=60=2008052003:06:5710=172) > <20080520-03:06:57, FIX.4.4:MP->CLIENT, event> > (Invalid message: Expected BodyLength=107, Recieved BodyLength=109) > Here's the code that generates the message: > static unsigned long clientID = 0; > ostringstream cid; cid << ++clientID; > FIX44::NewOrderSingle o(cid.str(), FIX::Side_SELL, > FIX::TransactTime(), FIX:: > FIX::Header& h = o.getHeader(); > o.set(FIX::HandlInst('1')); > o.set(FIX::Symbol("C")); > o.set(FIX::OrderQty(500)); > o.set(FIX::TimeInForce(1)); > h.setField(FIX::SenderCompID("CLIENT")); h.setField > (FIX::TargetCompID("MP")); > FIX::Session::sendToTarget(o); > -- > Vincent<hr>------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/<hr>_______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers |