|
From: t.s. <tru...@cb...> - 2007-05-15 17:17:29
|
Hello again everyone :),
Thanks to everyone's help, i managed to write a very basic initiator. So
now I'm trying to create a QuoteRequest object like this :
...
try {
quickfix.fix43.QuoteRequest qr = new quickfix.fix43.QuoteRequest();
qr.getHeader().setField(new SenderSubID("XX"));
qr.set(new QuoteReqID());
qr.set(new NoRelatedSym(1));
quickfix.fix43.QuoteRequest.NoRelatedSym group =
new quickfix.fix43.QuoteRequest.NoRelatedSym();
group.set(new Symbol("AUD/USD"));
group.set(new Product(4));
group.set(new OrderQty(5000000));
qr.addGroup(group);
Session.sendToTarget(qr, "SENDER", "TARGET");
} catch (Exception e) {
e.printStackTrace();
System.out.println("error sending quote request");
}
...
For my own debugging purposes, i have a toApp() method like this:
...
public void toApp(Message message, SessionID sessionID) throws DoNotSend {
if (isMessageOfType(message, MsgType.QUOTE_REQUEST)) {
System.out.println("QuoteRequest:" + message.toString());
}
}
...
Now here's the strange thing. Screen output from the toApp() method
shows a "50=XX" field (the SenderSubID Field), but the server log and
quickfixj's own log shows no such fields. Almost as if the field got
overwritten somehow. Viewing the log with the QuickFix Log Viewer shows
that 'SessionRejectReason(373)=RequiredTagMissing' and 'RefTagID(371)=50'.
Did i mess up the QuoteRequest construction ? Please help.
Thank you very much in advance,
regards,
t.s.
PS: I also see some errors about "MsgSeqNum too high' in the event log,
but only appears intermittenly. Is this significant, or is this a
different issue altogether ?
|