I'm trying the sample code in the docs, and I get a
org.quickfix.SessionNotFound Exception when I try to send a message. I
get a valid SessionID from the onCreate() method when my Application
impl starts, and I thought from there I could use the static methods in
Session to send? What am I missing?
-Billy
void sendOrderCancelRequest() {
org.quickfix.fix41.OrderCancelRequest message = new
org.quickfix.fix41.OrderCancelRequest (
new OrigClOrdID("123"),
new ClOrdID("321"),
new Symbol("LNUX"),
new Side(Side.BUY));
message.set(new Text("Cancel My Order!"));
try {
Session.sendToTarget(message, "TW", "TARGET");
} catch (Exception e) {
log.error(e);
}
}
|