[This message was posted by John Unwin of KaiTrade <[email protected]> to the 
"General Q/A" discussion forum at http://fixprotocol.org/discuss/22. You can 
reply to it on-line at http://fixprotocol.org/discuss/read/2b588f6b - PLEASE DO 
NOT REPLY BY MAIL.]

Where do you construct the incomming message? you probably have a regular 
QuickFix Message Object (with your custom message in it) but cannot cast it 
down to the type you want since it is actually the QuickFix.Message class - not 
your subtype.

Feel free to email me off line

Kind Regards
John

Guys, need help on QuickFix. We are a buyside firm and trading with a
> counter-party through FIX. Both are using QuickFix (.Net). We have
> mutually developed a few custom messages (user defined) e.g. Multi-leg
> orders in Fix4.2 (otherwise not supported in 4.2). We have extented from
> QuickFix.Message Class (as all other classes in quickfix do). We are
> able to initialize and construct the custom message on outbound side and
> send to quick fix without any problem.
> 
> However on the inbound side, when we get the OnMessage event and try to
> cast Message into Custom Message Class, we are unable to cast it. (We
> have taken care of dictionary etc)
> 
> Any thoughts?
> 
> e.g.
> 
> Buy Side: FIX.NewOrderMultiLeg fixOrder = new
> FIX.NewOrderMultiLeg(); //custom message
> Session.sendToTarget(fixOrder, sessionID); // works fine
> 
> Sell Side: onMessage(QuickFix.Message message, QuickFix.SessionID
> session) { FIX.NewOrderMultiLeg _order = (FIX.NewOrderMultiLeg)message;
> // fails (unable to cast .net exception) }
> 
> FIX.NewOrderMultiLeg is inheriting from QuickFix42.Message class of
> QuickFix. Both buy side and sell side have the same implementation of
> FIX.NewOrderMultiLeg as well as QuickFix versions are same.


[You can unsubscribe from this discussion group by sending a message to 
mailto:[email protected]]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Financial Information eXchange" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/FIX-Protocol?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to