Re: [Quickfix-developers] Trouble retrieving repeating groups
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2006-11-10 19:55:28
|
Vandana,
Do you have a data dictionary associated with your session?
--oren
On Nov 10, 2006, at 12:48 PM, Mamidanna, Vandana (GWM<) wrote:
> All,
> I am trying to test MarketDataRequest (MsgType=3DV) and =20
> MarketDataSnapshotFullRefresh (MsgType =3D W). I did not have a =20
> problem sending the symbol values ('GBP/USD') values as a repeating =20=
> group in MsgType V, but the issue that I am having is retrieving =20
> the repeating group values of MDEntryPx (Tag 270) and MDEntrySize =20
> (Tag 271) and so on from MsgType W. Our code is written in C#. I am =20=
> going to send you the snippet of code that I am using as of now:
>
> QuickFix42.MarketDataSnapshotFullRefresh.NoMDEntries grpMDEntries =3D =20=
> new QuickFix42.MarketDataSnapshotFullRefresh.NoMDEntries();
>
> MDEntryType entryType =3D new MDEntryType();
> MDEntryPx indicativePrice =3D new MDEntryPx();
> MDEntrySize entrySize =3D new MDEntrySize();
> Currency curr =3D new Currency();
> for(uint cnt =3D 1; cnt <=3D noMDEntries.getValue();cnt++) I tried =20
> reading this as a zero-based group, that did not work
> {
> message.getGroup(cnt, grpMDEntries); This is where I am getting a =20
> Exception of type QuickFix.FieldNotFound was thrown.
> grpMDEntries.get(entryType);
> grpMDEntries.get(indicativePrice);
> grpMDEntries.get(entrySize);
> grpMDEntries.get(curr);
> FxQuote.UpdateFXRate(symbol.getValue().Trim(), brokerID, =20
> indicativePrice.getValue());
> }
> The sample message that I am working off of is:
> 8=3DFIX.4.2=019=3D121=0135=3DW=0149=3DTS-UAT=0156=3DML-=20
> UAT=0134=3D3=0152=3D20061109-23:01:14=01262=3D0611090012=0155=3DHKD/=20=
> USD=0176=3DUBSFX=01268=3D1=01269=3D0=01270=3D0.1285=01271=3D1000000=0110=
=3D170=01
>
> I do see that the MDEntryPx (Tag 270) is being sent back, but then =20
> again the code does not compile if I tried to access it as:
>
> MDEntryPx indicativePrice =3D new MDEntryPx();
> message.get(indicativePrice);
> The only work-around that I am using as of now which is not the =20
> right way of doing it is:
> price =3D message.getField(270);
> What am I doing wrong here? Any help to shed some light is =20
> appreciated.
> Thanks a lot in advance,
> Vandana (Vandy).
|