[Quickfix-developers] Trouble retrieving repeating groups
Brought to you by:
orenmnero
|
From: Mamidanna, V. \(GWM<\) <Van...@ml...> - 2006-11-10 19:42:57
|
All,
I am trying to test MarketDataRequest (MsgType=3DV) and
MarketDataSnapshotFullRefresh (MsgType =3D W). I did not have a problem
sending the symbol values ('GBP/USD') values as a repeating group in
MsgType V, but the issue that I am having is retrieving the repeating
group values of MDEntryPx (Tag 270) and MDEntrySize (Tag 271) and so on
from MsgType W. Our code is written in C#. I am going to send you the
snippet of code that I am using as of now:
QuickFix42.MarketDataSnapshotFullRefresh.NoMDEntries grpMDEntries =3D =
new
QuickFix42.MarketDataSnapshotFullRefresh.NoMDEntries();
MDEntryType entryType =3D new MDEntryType();=20
MDEntryPx indicativePrice =3D new MDEntryPx();=20
MDEntrySize entrySize =3D new MDEntrySize();=20
Currency curr =3D new Currency();=20
for(uint cnt =3D 1; cnt <=3D noMDEntries.getValue();cnt++) I tried =
reading
this as a zero-based group, that did not work=20
{=20
message.getGroup(cnt, grpMDEntries); This is where I am getting a
Exception of type QuickFix.FieldNotFound was thrown.
grpMDEntries.get(entryType);=20
grpMDEntries.get(indicativePrice);=20
grpMDEntries.get(entrySize);=20
grpMDEntries.get(curr);=20
FxQuote.UpdateFXRate(symbol.getValue().Trim(), brokerID,
indicativePrice.getValue());=20
}=20
The sample message that I am working off of is:=20
8=3DFIX.4.2=019=3D121=0135=3DW=0149=3DTS-UAT=0156=3DML-UAT=0134=3D3=0152=3D=
20061109-23:01:14=01262=3D0
611090012=0155=3DHKD/USD=0176=3DUBSFX=01268=3D1=01269=3D0=01270=3D0.1285=01=
271=3D1000000=0110=3D170=01
I do see that the MDEntryPx (Tag 270) is being sent back, but then again
the code does not compile if I tried to access it as:
MDEntryPx indicativePrice =3D new MDEntryPx();=20
message.get(indicativePrice);=20
The only work-around that I am using as of now which is not the right
way of doing it is:=20
price =3D message.getField(270);=20
What am I doing wrong here? Any help to shed some light is appreciated.
Thanks a lot in advance,=20
Vandana (Vandy).
--------------------------------------------------------
If you are not an intended recipient of this e-mail, please notify the =
sender, delete it and do not read, act upon, print, disclose, copy, =
retain or redistribute it. Click here for important additional terms =
relating to this e-mail. http://www.ml.com/email_terms/
--------------------------------------------------------
|