[QFJ-50] Example code for sending messages is incorrect Created: 12/Aug/06  Updated: 12/Apr/07  Resolved: 17/Aug/06

Status: Closed
Project: QuickFIX/J
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1.0

Type: Bug Priority: Default
Reporter: Markus Khouri Assignee: Markus Khouri
Resolution: Fixed Votes: 0
Labels: None


 Description   

2 issues on the page http://www.quickfixj.org/quickfixj/usermanual/usage/sending_messages.html in the section "Most Type Safe... DO THIS!", the following code is shown:

{{{
quickfix.fix41.OrderCancelRequest message(
new OrigClOrdID("123"),
new ClOrdID("321"),
new Symbol("LNUX"),
new Side(Side.BUY));
}}}

This does not compile because the variable is not created correctly; it should be

{{{
quickfix.fix41.OrderCancelRequest message = new quickfix.fix41.OrderCancelRequest (
new OrigClOrdID("123"),
new ClOrdID("321"),
new Symbol("LNUX"),
new Side(Side.BUY));
}}}

Note the additional code "= new quickfix.fix41.OrderCancelRequest"

Second issue:

The line "Session.sendToTarget(message, "TW", "TARGET");" throws "SessionNotFound" which needs to be surrounded in a try..catch block



 Comments   
Comment by Steve Bate [ 17/Aug/06 ]

I've modified the example in the documentation. Thanks for reporting this.

Comment by Steve Bate [ 17/Aug/06 ]

Modification has been committed to the svn trunk.

Comment by Markus Khouri [ 22/Aug/06 ]

when this is updated on the web site, and i remember to check it, i will close the issue.

Generated at Sat Nov 23 11:19:18 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.