I'm very new in quickfix.
I created a client that connects normally with server. On my fromApp() function I can print the message with a simple std::cout << message << std::endl; and all fields of the message are there, also they are there on log files. When I try to call crack() it throws Field not found exception. Looking at log files I saw that the exception is thrown because quickfix can't find field 35. Anyone knows something about this?
EDIT1:
void fromApp( const FIX::Message& message,
const FIX::SessionID& sessionID )
throw( FIX::FieldNotFound, FIX::IncorrectDataFormat, FIX::IncorrectTagValue, FIX::UnsupportedMessageType )
{
std::cout << "FromApp" << std::endl;
std::cout << message << std::endl;
try
{
crack( message, sessionID );
}
catch(std::exception& ex)
{
std::cout << "crack exception: " << ex.what() << std::endl;
}
}
void onMessage( const FIX44::MarketDataIncrementalRefresh& message, const FIX::SessionID& sessionID )
{
std::cout << "OnMessage" << std::endl;
}
On my terminal windows I get the following output:
FromApp
8=FIX.4.49=12335=W34=7249=servidor52=20150123-13:34:56.95756=cliente22=448=CERB001D55=CERB001D268=1269=0270=100271=1000290=110=239
crack exception: Field not found
On the the message.current.log I get:
20150123-13:29:03.618 : 8=FIX.4.49=7035=A34=149=cliente52=20150123-13:29:03.61856=servidor98=0108=2010=077
20150123-13:29:03.655 : 8=FIX.4.49=7035=A34=149=servidor52=20150123-13:29:03.65856=cliente98=0108=2010=081
20150123-13:29:06.629 : 8=FIX.4.49=12235=W34=249=servidor52=20150123-13:29:06.63556=cliente22=448=CERB001D55=CERB001D268=1269=0270=100271=1000290=110=175
EDIT2:
When I put the crack() function outside the try-catch block, in message.event.log I get:
20150123-15:49:11.204 : Message 2 Rejected: Conditionally Required Field Missing:35
20150123-15:49:16.221 : Message 3 Rejected: Conditionally Required Field Missing:35
Thank you in advance.